cloudmersive-validate-api-client 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a5d849be72f0460fb5087353a35c3c135c399728d5c20ad9eb73a6ad7314f02
4
- data.tar.gz: caf6a09893146d0826ccaf1be78b231797e87b2f889060a343f8b78f3ef27cbd
3
+ metadata.gz: 2fb56107e866366c0bbe0cb0406b1a577b4ecd93769850a24144912c942ca33c
4
+ data.tar.gz: 79013bc0deb6aadca1c1c17bac8d78bcbfbbb2012d4619f797cee37928d3861f
5
5
  SHA512:
6
- metadata.gz: 1d1c337167f8e1f54c9b277c1247552517bb87c3b6eab3e49ed695bff3efaaf718b1f569064325f25b4bab59520861d477fcc1720424c187530ea859454bd346
7
- data.tar.gz: 3b462325435212058db781798ae6fb84df3ea921cca9c90bdd94305925defd0599cd989ed45fd0ec5419e19cea783f10ca9f694c1052ff8d3b4f27dfe7e359f9
6
+ metadata.gz: 43fd253ae8999d42507d0fe7a8fbf5aeb2b43891b21cb2d53d16c4a1584ccfda4a6aa9f91457b5600dbc2e2180d90cccf2f5a00b106078b9187a3400061292b8
7
+ data.tar.gz: 0d0456435a45f680ed768b49b778b50cd72115f8da1515374ac369e0008d64cc6ec84bc717516ccf0db0b93a3028cba1f4b449caee45ed06b7d34c7965f92d48
data/README.md CHANGED
@@ -7,7 +7,7 @@ The validation APIs help you validate data. Check if an E-mail address is real.
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 2.2.2
10
+ - Package version: 2.2.3
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-validate-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-validate-api-client-2.2.2.gem
26
+ gem install ./cloudmersive-validate-api-client-2.2.3.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-validate-api-client-2.2.2.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-validate-api-client-2.2.3.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-validate-api-client', '~> 2.2.2'
34
+ gem 'cloudmersive-validate-api-client', '~> 2.2.3'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -103,7 +103,7 @@ Class | Method | HTTP request | Description
103
103
  *CloudmersiveValidateApiClient::DateTimeApi* | [**date_time_parse_standard_date_time**](docs/DateTimeApi.md#date_time_parse_standard_date_time) | **POST** /validate/date-time/parse/date-time/structured | Parses a standardized date and time string into a date and time
104
104
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_check**](docs/DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
105
105
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_get_top_level_domain_from_url**](docs/DomainApi.md#domain_get_top_level_domain_from_url) | **POST** /validate/domain/url/get-top-level-domain | Get top-level domain name from URL
106
- *CloudmersiveValidateApiClient::DomainApi* | [**domain_is_admin_path**](docs/DomainApi.md#domain_is_admin_path) | **POST** /validate/domain/url/is-admin-path | Check if path is a high-risk server administration path
106
+ *CloudmersiveValidateApiClient::DomainApi* | [**domain_is_admin_path**](docs/DomainApi.md#domain_is_admin_path) | **POST** /validate/domain/url/is-admin-path | Check if path is a high-risk or vulnerable server administration path
107
107
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_phishing_check**](docs/DomainApi.md#domain_phishing_check) | **POST** /validate/domain/url/phishing-threat-check | Check a URL for Phishing threats
108
108
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_post**](docs/DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
109
109
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_quality_score**](docs/DomainApi.md#domain_quality_score) | **POST** /validate/domain/quality-score | Validate a domain name's quality score
@@ -129,6 +129,7 @@ Class | Method | HTTP request | Description
129
129
  *CloudmersiveValidateApiClient::NameApi* | [**name_validate_full_name**](docs/NameApi.md#name_validate_full_name) | **POST** /validate/name/full-name | Parse and validate a full name
130
130
  *CloudmersiveValidateApiClient::NameApi* | [**name_validate_last_name**](docs/NameApi.md#name_validate_last_name) | **POST** /validate/name/last | Validate a last name
131
131
  *CloudmersiveValidateApiClient::PhoneNumberApi* | [**phone_number_syntax_only**](docs/PhoneNumberApi.md#phone_number_syntax_only) | **POST** /validate/phonenumber/basic | Validate phone number (basic)
132
+ *CloudmersiveValidateApiClient::TextInputApi* | [**text_input_check_html_ssrf**](docs/TextInputApi.md#text_input_check_html_ssrf) | **POST** /validate/text-input/html/check/ssrf | Protect html input from Server-side Request Forgery (SSRF) attacks
132
133
  *CloudmersiveValidateApiClient::TextInputApi* | [**text_input_check_sql_injection**](docs/TextInputApi.md#text_input_check_sql_injection) | **POST** /validate/text-input/check/sql-injection | Check text input for SQL Injection (SQLI) attacks
133
134
  *CloudmersiveValidateApiClient::TextInputApi* | [**text_input_check_sql_injection_batch**](docs/TextInputApi.md#text_input_check_sql_injection_batch) | **POST** /validate/text-input/check/sql-injection/batch | Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
134
135
  *CloudmersiveValidateApiClient::TextInputApi* | [**text_input_check_xss**](docs/TextInputApi.md#text_input_check_xss) | **POST** /validate/text-input/check/xss | Check text input for Cross-Site-Scripting (XSS) attacks
@@ -165,6 +166,7 @@ Class | Method | HTTP request | Description
165
166
  - [CloudmersiveValidateApiClient::GetPublicHolidaysRequest](docs/GetPublicHolidaysRequest.md)
166
167
  - [CloudmersiveValidateApiClient::GetTimezonesRequest](docs/GetTimezonesRequest.md)
167
168
  - [CloudmersiveValidateApiClient::GetTimezonesResponse](docs/GetTimezonesResponse.md)
169
+ - [CloudmersiveValidateApiClient::HtmlSsrfDetectionResult](docs/HtmlSsrfDetectionResult.md)
168
170
  - [CloudmersiveValidateApiClient::IPIntelligenceResponse](docs/IPIntelligenceResponse.md)
169
171
  - [CloudmersiveValidateApiClient::IPReverseDNSLookupResponse](docs/IPReverseDNSLookupResponse.md)
170
172
  - [CloudmersiveValidateApiClient::IPThreatResponse](docs/IPThreatResponse.md)
data/docs/DomainApi.md CHANGED
@@ -6,7 +6,7 @@ Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**domain_check**](DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
8
8
  [**domain_get_top_level_domain_from_url**](DomainApi.md#domain_get_top_level_domain_from_url) | **POST** /validate/domain/url/get-top-level-domain | Get top-level domain name from URL
9
- [**domain_is_admin_path**](DomainApi.md#domain_is_admin_path) | **POST** /validate/domain/url/is-admin-path | Check if path is a high-risk server administration path
9
+ [**domain_is_admin_path**](DomainApi.md#domain_is_admin_path) | **POST** /validate/domain/url/is-admin-path | Check if path is a high-risk or vulnerable server administration path
10
10
  [**domain_phishing_check**](DomainApi.md#domain_phishing_check) | **POST** /validate/domain/url/phishing-threat-check | Check a URL for Phishing threats
11
11
  [**domain_post**](DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
12
12
  [**domain_quality_score**](DomainApi.md#domain_quality_score) | **POST** /validate/domain/quality-score | Validate a domain name's quality score
@@ -128,9 +128,9 @@ Name | Type | Description | Notes
128
128
  # **domain_is_admin_path**
129
129
  > IsAdminPathResponse domain_is_admin_path(value)
130
130
 
131
- Check if path is a high-risk server administration path
131
+ Check if path is a high-risk or vulnerable server administration path
132
132
 
133
- Check if the input URL or relative path is a server Administration Path, and therefore a risk for remote access.
133
+ Check if the input URL or relative path is a server Administration Path, and therefore a risk or vulnerability for remote access.
134
134
 
135
135
  ### Example
136
136
  ```ruby
@@ -150,7 +150,7 @@ value = 'value_example' # String | URL or relative path to check, e.g. \"/admin/
150
150
 
151
151
 
152
152
  begin
153
- #Check if path is a high-risk server administration path
153
+ #Check if path is a high-risk or vulnerable server administration path
154
154
  result = api_instance.domain_is_admin_path(value)
155
155
  p result
156
156
  rescue CloudmersiveValidateApiClient::ApiError => e
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::HtmlSsrfDetectionResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **contained_threats** | **BOOLEAN** | True if the input contained SSRF threats, false otherwise | [optional]
8
+
9
+
data/docs/TextInputApi.md CHANGED
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.cloudmersive.com*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**text_input_check_html_ssrf**](TextInputApi.md#text_input_check_html_ssrf) | **POST** /validate/text-input/html/check/ssrf | Protect html input from Server-side Request Forgery (SSRF) attacks
7
8
  [**text_input_check_sql_injection**](TextInputApi.md#text_input_check_sql_injection) | **POST** /validate/text-input/check/sql-injection | Check text input for SQL Injection (SQLI) attacks
8
9
  [**text_input_check_sql_injection_batch**](TextInputApi.md#text_input_check_sql_injection_batch) | **POST** /validate/text-input/check/sql-injection/batch | Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
9
10
  [**text_input_check_xss**](TextInputApi.md#text_input_check_xss) | **POST** /validate/text-input/check/xss | Check text input for Cross-Site-Scripting (XSS) attacks
@@ -13,6 +14,60 @@ Method | HTTP request | Description
13
14
  [**text_input_protect_xss**](TextInputApi.md#text_input_protect_xss) | **POST** /validate/text-input/protect/xss | Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
14
15
 
15
16
 
17
+ # **text_input_check_html_ssrf**
18
+ > HtmlSsrfDetectionResult text_input_check_html_ssrf(value)
19
+
20
+ Protect html input from Server-side Request Forgery (SSRF) attacks
21
+
22
+ Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML.
23
+
24
+ ### Example
25
+ ```ruby
26
+ # load the gem
27
+ require 'cloudmersive-validate-api-client'
28
+ # setup authorization
29
+ CloudmersiveValidateApiClient.configure do |config|
30
+ # Configure API key authorization: Apikey
31
+ config.api_key['Apikey'] = 'YOUR API KEY'
32
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
33
+ #config.api_key_prefix['Apikey'] = 'Bearer'
34
+ end
35
+
36
+ api_instance = CloudmersiveValidateApiClient::TextInputApi.new
37
+
38
+ value = 'value_example' # String | User-facing HTML input.
39
+
40
+
41
+ begin
42
+ #Protect html input from Server-side Request Forgery (SSRF) attacks
43
+ result = api_instance.text_input_check_html_ssrf(value)
44
+ p result
45
+ rescue CloudmersiveValidateApiClient::ApiError => e
46
+ puts "Exception when calling TextInputApi->text_input_check_html_ssrf: #{e}"
47
+ end
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **value** | **String**| User-facing HTML input. |
55
+
56
+ ### Return type
57
+
58
+ [**HtmlSsrfDetectionResult**](HtmlSsrfDetectionResult.md)
59
+
60
+ ### Authorization
61
+
62
+ [Apikey](../README.md#Apikey)
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: application/json, text/json
67
+ - **Accept**: application/json, text/json, application/xml, text/xml
68
+
69
+
70
+
16
71
  # **text_input_check_sql_injection**
17
72
  > SqlInjectionDetectionResult text_input_check_sql_injection(value, opts)
18
73
 
@@ -40,6 +40,7 @@ require 'cloudmersive-validate-api-client/models/get_gender_response'
40
40
  require 'cloudmersive-validate-api-client/models/get_public_holidays_request'
41
41
  require 'cloudmersive-validate-api-client/models/get_timezones_request'
42
42
  require 'cloudmersive-validate-api-client/models/get_timezones_response'
43
+ require 'cloudmersive-validate-api-client/models/html_ssrf_detection_result'
43
44
  require 'cloudmersive-validate-api-client/models/ip_intelligence_response'
44
45
  require 'cloudmersive-validate-api-client/models/ip_reverse_dns_lookup_response'
45
46
  require 'cloudmersive-validate-api-client/models/ip_threat_response'
@@ -127,8 +127,8 @@ module CloudmersiveValidateApiClient
127
127
  end
128
128
  return data, status_code, headers
129
129
  end
130
- # Check if path is a high-risk server administration path
131
- # Check if the input URL or relative path is a server Administration Path, and therefore a risk for remote access.
130
+ # Check if path is a high-risk or vulnerable server administration path
131
+ # Check if the input URL or relative path is a server Administration Path, and therefore a risk or vulnerability for remote access.
132
132
  # @param value URL or relative path to check, e.g. \"/admin/login\". The input is a string so be sure to enclose it in double-quotes.
133
133
  # @param [Hash] opts the optional parameters
134
134
  # @return [IsAdminPathResponse]
@@ -137,8 +137,8 @@ module CloudmersiveValidateApiClient
137
137
  data
138
138
  end
139
139
 
140
- # Check if path is a high-risk server administration path
141
- # Check if the input URL or relative path is a server Administration Path, and therefore a risk for remote access.
140
+ # Check if path is a high-risk or vulnerable server administration path
141
+ # Check if the input URL or relative path is a server Administration Path, and therefore a risk or vulnerability for remote access.
142
142
  # @param value URL or relative path to check, e.g. \"/admin/login\". The input is a string so be sure to enclose it in double-quotes.
143
143
  # @param [Hash] opts the optional parameters
144
144
  # @return [Array<(IsAdminPathResponse, Fixnum, Hash)>] IsAdminPathResponse data, response status code and response headers
@@ -19,6 +19,60 @@ module CloudmersiveValidateApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Protect html input from Server-side Request Forgery (SSRF) attacks
23
+ # Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML.
24
+ # @param value User-facing HTML input.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [HtmlSsrfDetectionResult]
27
+ def text_input_check_html_ssrf(value, opts = {})
28
+ data, _status_code, _headers = text_input_check_html_ssrf_with_http_info(value, opts)
29
+ data
30
+ end
31
+
32
+ # Protect html input from Server-side Request Forgery (SSRF) attacks
33
+ # Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML.
34
+ # @param value User-facing HTML input.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(HtmlSsrfDetectionResult, Fixnum, Hash)>] HtmlSsrfDetectionResult data, response status code and response headers
37
+ def text_input_check_html_ssrf_with_http_info(value, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_html_ssrf ...'
40
+ end
41
+ # verify the required parameter 'value' is set
42
+ if @api_client.config.client_side_validation && value.nil?
43
+ fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_html_ssrf"
44
+ end
45
+ # resource path
46
+ local_var_path = '/validate/text-input/html/check/ssrf'
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = @api_client.object_to_http_body(value)
63
+ auth_names = ['Apikey']
64
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'HtmlSsrfDetectionResult')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: TextInputApi#text_input_check_html_ssrf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
22
76
  # Check text input for SQL Injection (SQLI) attacks
23
77
  # Detects SQL Injection (SQLI) attacks from text input.
24
78
  # @param value User-facing text input.
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #validateapi
3
+
4
+ #The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveValidateApiClient
16
+ # Result of performing an XXE threat detection operation
17
+ class HtmlSsrfDetectionResult
18
+ # True if the operation was successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # True if the input contained SSRF threats, false otherwise
22
+ attr_accessor :contained_threats
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'successful' => :'Successful',
28
+ :'contained_threats' => :'ContainedThreats'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'successful' => :'BOOLEAN',
36
+ :'contained_threats' => :'BOOLEAN'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'Successful')
49
+ self.successful = attributes[:'Successful']
50
+ end
51
+
52
+ if attributes.has_key?(:'ContainedThreats')
53
+ self.contained_threats = attributes[:'ContainedThreats']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ successful == o.successful &&
76
+ contained_threats == o.contained_threats
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [successful, contained_threats].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+ self.class.swagger_types.each_pair do |key, type|
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
106
+ end
107
+
108
+ self
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def _deserialize(type, value)
116
+ case type.to_sym
117
+ when :DateTime
118
+ DateTime.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :BOOLEAN
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+ when :Object
134
+ # generic object (usually a Hash), return directly
135
+ value
136
+ when /\AArray<(?<inner_type>.+)>\z/
137
+ inner_type = Regexp.last_match[:inner_type]
138
+ value.map { |v| _deserialize(inner_type, v) }
139
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
+ k_type = Regexp.last_match[:k_type]
141
+ v_type = Regexp.last_match[:v_type]
142
+ {}.tap do |hash|
143
+ value.each do |k, v|
144
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ end
146
+ end
147
+ else # model
148
+ temp_model = CloudmersiveValidateApiClient.const_get(type).new
149
+ temp_model.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ next if value.nil?
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+
195
+ end
196
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveValidateApiClient
14
- VERSION = '2.2.2'
14
+ VERSION = '2.2.3'
15
15
  end
@@ -57,8 +57,8 @@ describe 'DomainApi' do
57
57
  end
58
58
 
59
59
  # unit tests for domain_is_admin_path
60
- # Check if path is a high-risk server administration path
61
- # Check if the input URL or relative path is a server Administration Path, and therefore a risk for remote access.
60
+ # Check if path is a high-risk or vulnerable server administration path
61
+ # Check if the input URL or relative path is a server Administration Path, and therefore a risk or vulnerability for remote access.
62
62
  # @param value URL or relative path to check, e.g. \&quot;/admin/login\&quot;. The input is a string so be sure to enclose it in double-quotes.
63
63
  # @param [Hash] opts the optional parameters
64
64
  # @return [IsAdminPathResponse]
@@ -32,6 +32,18 @@ describe 'TextInputApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for text_input_check_html_ssrf
36
+ # Protect html input from Server-side Request Forgery (SSRF) attacks
37
+ # Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML.
38
+ # @param value User-facing HTML input.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [HtmlSsrfDetectionResult]
41
+ describe 'text_input_check_html_ssrf test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
35
47
  # unit tests for text_input_check_sql_injection
36
48
  # Check text input for SQL Injection (SQLI) attacks
37
49
  # Detects SQL Injection (SQLI) attacks from text input.
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #validateapi
3
+
4
+ #The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveValidateApiClient::HtmlSsrfDetectionResult
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'HtmlSsrfDetectionResult' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveValidateApiClient::HtmlSsrfDetectionResult.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of HtmlSsrfDetectionResult' do
31
+ it 'should create an instance of HtmlSsrfDetectionResult' do
32
+ expect(@instance).to be_instance_of(CloudmersiveValidateApiClient::HtmlSsrfDetectionResult)
33
+ end
34
+ end
35
+ describe 'test attribute "successful"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "contained_threats"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-validate-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-17 00:00:00.000000000 Z
11
+ date: 2021-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -230,6 +230,7 @@ files:
230
230
  - "./docs/GetPublicHolidaysRequest.md"
231
231
  - "./docs/GetTimezonesRequest.md"
232
232
  - "./docs/GetTimezonesResponse.md"
233
+ - "./docs/HtmlSsrfDetectionResult.md"
233
234
  - "./docs/IPAddressApi.md"
234
235
  - "./docs/IPIntelligenceResponse.md"
235
236
  - "./docs/IPReverseDNSLookupResponse.md"
@@ -336,6 +337,7 @@ files:
336
337
  - "./lib/cloudmersive-validate-api-client/models/get_public_holidays_request.rb"
337
338
  - "./lib/cloudmersive-validate-api-client/models/get_timezones_request.rb"
338
339
  - "./lib/cloudmersive-validate-api-client/models/get_timezones_response.rb"
340
+ - "./lib/cloudmersive-validate-api-client/models/html_ssrf_detection_result.rb"
339
341
  - "./lib/cloudmersive-validate-api-client/models/ip_intelligence_response.rb"
340
342
  - "./lib/cloudmersive-validate-api-client/models/ip_reverse_dns_lookup_response.rb"
341
343
  - "./lib/cloudmersive-validate-api-client/models/ip_threat_response.rb"
@@ -433,6 +435,7 @@ files:
433
435
  - "./spec/models/get_public_holidays_request_spec.rb"
434
436
  - "./spec/models/get_timezones_request_spec.rb"
435
437
  - "./spec/models/get_timezones_response_spec.rb"
438
+ - "./spec/models/html_ssrf_detection_result_spec.rb"
436
439
  - "./spec/models/ip_intelligence_response_spec.rb"
437
440
  - "./spec/models/ip_reverse_dns_lookup_response_spec.rb"
438
441
  - "./spec/models/ip_threat_response_spec.rb"