zendesk_apps_support 4.46.0 → 4.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fe5a39adf599efda50c338932071c3bbdc8bcd4417befecf63608013020fa67
|
|
4
|
+
data.tar.gz: 682b86fdd57a57f52f21b6da8466e2f17e0b9274d9908f3ba7e5b3bf638329a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ee5307d3c799c13ce59ab81869d6f4ad2965c7931fe213d5043089d1484d235613a7b54d74d3e7a4b42b06a98111ef57bb572f8b0389a27345d52ffcecc7465
|
|
7
|
+
data.tar.gz: 84487b11ba75fe8ddc69526e1075399c954e18fc3d8dbb2aa6fa8785fd70b1768f59a6899df199f673cbfc90b64e9789d65241157f190ead31f9d2bf1dcfa13f
|
|
@@ -36,10 +36,9 @@ module ZendeskAppsSupport
|
|
|
36
36
|
skip_marketplace_translations = options.fetch(:skip_marketplace_translations, false)
|
|
37
37
|
error_on_password_parameter = options.fetch(:error_on_password_parameter, false)
|
|
38
38
|
validate_custom_objects_v2 = options.fetch(:validate_custom_objects_v2, false)
|
|
39
|
-
validate_scopes_for_secure_parameter = options.fetch(:validate_scopes_for_secure_parameter, false)
|
|
40
39
|
|
|
41
40
|
errors = []
|
|
42
|
-
errors << Validations::Manifest.call(self, error_on_password_parameter: error_on_password_parameter
|
|
41
|
+
errors << Validations::Manifest.call(self, error_on_password_parameter: error_on_password_parameter)
|
|
43
42
|
|
|
44
43
|
if has_valid_manifest?(errors)
|
|
45
44
|
errors << Validations::Marketplace.call(self) if marketplace
|
|
@@ -48,10 +47,7 @@ module ZendeskAppsSupport
|
|
|
48
47
|
errors << Validations::Requirements.call(self, validate_custom_objects_v2:)
|
|
49
48
|
|
|
50
49
|
# only adds warnings
|
|
51
|
-
Validations::SecureSettings.call(
|
|
52
|
-
self,
|
|
53
|
-
validate_scopes_for_secure_parameter: validate_scopes_for_secure_parameter
|
|
54
|
-
)
|
|
50
|
+
Validations::SecureSettings.call(self)
|
|
55
51
|
Validations::Requests.call(self)
|
|
56
52
|
|
|
57
53
|
unless manifest.requirements_only? || manifest.marketing_only? || manifest.iframe_only?
|
|
@@ -14,7 +14,7 @@ module ZendeskAppsSupport
|
|
|
14
14
|
SECURE_PARAM_SCOPES = %w[header body url jwt_secret_key jwt_claim basic_auth_username basic_auth_password].freeze
|
|
15
15
|
|
|
16
16
|
class << self
|
|
17
|
-
def call(package, error_on_password_parameter: false
|
|
17
|
+
def call(package, error_on_password_parameter: false)
|
|
18
18
|
unless package.has_file?('manifest.json')
|
|
19
19
|
nested_manifest = package.files.find { |file| file =~ %r{\A[^/]+?/manifest\.json\Z} }
|
|
20
20
|
if nested_manifest
|
|
@@ -25,7 +25,7 @@ module ZendeskAppsSupport
|
|
|
25
25
|
|
|
26
26
|
package.warnings << password_parameter_warning if !error_on_password_parameter && password_param_present?(package.manifest)
|
|
27
27
|
|
|
28
|
-
collate_manifest_errors(package, error_on_password_parameter
|
|
28
|
+
collate_manifest_errors(package, error_on_password_parameter)
|
|
29
29
|
rescue JSON::ParserError => e
|
|
30
30
|
return [ValidationError.new(:manifest_not_json, errors: e)]
|
|
31
31
|
rescue ZendeskAppsSupport::Manifest::OverrideError => e
|
|
@@ -38,7 +38,7 @@ module ZendeskAppsSupport
|
|
|
38
38
|
manifest.parameters.any? { |p| p.type == 'password' }
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
def collate_manifest_errors(package, error_on_password_parameter
|
|
41
|
+
def collate_manifest_errors(package, error_on_password_parameter)
|
|
42
42
|
manifest = package.manifest
|
|
43
43
|
|
|
44
44
|
errors = [
|
|
@@ -47,7 +47,7 @@ module ZendeskAppsSupport
|
|
|
47
47
|
oauth_error(manifest),
|
|
48
48
|
default_locale_error(manifest, package),
|
|
49
49
|
validate_urls(manifest),
|
|
50
|
-
validate_parameters(manifest
|
|
50
|
+
validate_parameters(manifest),
|
|
51
51
|
if manifest.requirements_only? || manifest.marketing_only?
|
|
52
52
|
[ ban_location(manifest),
|
|
53
53
|
ban_framework_version(manifest) ]
|
|
@@ -88,7 +88,7 @@ module ZendeskAppsSupport
|
|
|
88
88
|
errors
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
-
def validate_parameters(manifest
|
|
91
|
+
def validate_parameters(manifest)
|
|
92
92
|
if manifest.marketing_only?
|
|
93
93
|
marketing_only_errors(manifest)
|
|
94
94
|
else
|
|
@@ -99,7 +99,7 @@ module ZendeskAppsSupport
|
|
|
99
99
|
too_many_oauth_parameters(manifest),
|
|
100
100
|
oauth_cannot_be_secure(manifest),
|
|
101
101
|
name_as_parameter_name_error(manifest),
|
|
102
|
-
|
|
102
|
+
invalid_secure_param_scopes_errors(manifest)
|
|
103
103
|
]
|
|
104
104
|
end
|
|
105
105
|
end
|
|
@@ -112,18 +112,6 @@ module ZendeskAppsSupport
|
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
def invalid_scopes_key_error(manifest)
|
|
116
|
-
errors = []
|
|
117
|
-
manifest.parameters.each do |parameter|
|
|
118
|
-
next if parameter.scopes.nil?
|
|
119
|
-
|
|
120
|
-
errors << ValidationError.new(:field_contains_invalid_keys,
|
|
121
|
-
field: "parameters[name=\"#{parameter.name}\"]",
|
|
122
|
-
keys: 'scopes')
|
|
123
|
-
end
|
|
124
|
-
errors
|
|
125
|
-
end
|
|
126
|
-
|
|
127
115
|
def invalid_secure_param_scopes_errors(manifest)
|
|
128
116
|
errors = []
|
|
129
117
|
|
|
@@ -7,7 +7,7 @@ module ZendeskAppsSupport
|
|
|
7
7
|
SECURABLE_KEYWORDS_REGEXP = Regexp.new(SECURABLE_KEYWORDS.join('|'), Regexp::IGNORECASE)
|
|
8
8
|
|
|
9
9
|
class << self
|
|
10
|
-
def call(package
|
|
10
|
+
def call(package)
|
|
11
11
|
manifest_params = package.manifest.parameters
|
|
12
12
|
|
|
13
13
|
insecure_params_found = manifest_params.any? { |param| insecure_param?(param) }
|
|
@@ -16,10 +16,8 @@ module ZendeskAppsSupport
|
|
|
16
16
|
secure_or_hidden_default_param_found = manifest_params.any? { |param| secure_or_hidden_default_param?(param) }
|
|
17
17
|
package.warnings << hidden_default_parameter_warning if secure_or_hidden_default_param_found
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
package.warnings << no_scopes_warning(unscoped_secure_param_names) if unscoped_secure_param_names.any?
|
|
22
|
-
end
|
|
19
|
+
unscoped_secure_param_names = manifest_params.filter_map { |param| name_if_secure_unscoped(param) }
|
|
20
|
+
package.warnings << no_scopes_warning(unscoped_secure_param_names) if unscoped_secure_param_names.any?
|
|
23
21
|
end
|
|
24
22
|
|
|
25
23
|
private
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zendesk_apps_support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.47.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James A. Rosen
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2026-02-17 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: i18n
|