cloudmersive-validate-api-client 2.1.7 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -4
- data/docs/DomainApi.md +110 -0
- data/docs/HtmlSsrfDetectionResult.md +9 -0
- data/docs/IsAdminPathResponse.md +9 -0
- data/docs/SqlInjectionCheckBatchRequest.md +9 -0
- data/docs/SqlInjectionCheckBatchResponse.md +8 -0
- data/docs/SqlInjectionCheckRequestItem.md +8 -0
- data/docs/SqlInjectionDetectionResult.md +10 -0
- data/docs/TextInputApi.md +288 -1
- data/docs/UrlHtmlSsrfRequestFull.md +8 -0
- data/docs/UrlHtmlSsrfResponseFull.md +9 -0
- data/docs/XxeDetectionBatchRequest.md +8 -0
- data/docs/XxeDetectionBatchResponse.md +8 -0
- data/docs/XxeDetectionRequestItem.md +11 -0
- data/docs/XxeDetectionResult.md +9 -0
- data/lib/cloudmersive-validate-api-client.rb +12 -0
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +108 -0
- data/lib/cloudmersive-validate-api-client/api/text_input_api.rb +284 -2
- data/lib/cloudmersive-validate-api-client/models/html_ssrf_detection_result.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/is_admin_path_response.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_check_batch_request.rb +198 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_check_batch_response.rb +188 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_check_request_item.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/sql_injection_detection_result.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/url_html_ssrf_request_full.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/url_html_ssrf_response_full.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_batch_request.rb +188 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_batch_response.rb +188 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_request_item.rb +220 -0
- data/lib/cloudmersive-validate-api-client/models/xxe_detection_result.rb +196 -0
- data/lib/cloudmersive-validate-api-client/version.rb +1 -1
- data/spec/api/domain_api_spec.rb +24 -0
- data/spec/api/text_input_api_spec.rb +65 -1
- data/spec/models/html_ssrf_detection_result_spec.rb +47 -0
- data/spec/models/is_admin_path_response_spec.rb +47 -0
- data/spec/models/sql_injection_check_batch_request_spec.rb +47 -0
- data/spec/models/sql_injection_check_batch_response_spec.rb +41 -0
- data/spec/models/sql_injection_check_request_item_spec.rb +41 -0
- data/spec/models/sql_injection_detection_result_spec.rb +53 -0
- data/spec/models/url_html_ssrf_request_full_spec.rb +41 -0
- data/spec/models/url_html_ssrf_response_full_spec.rb +47 -0
- data/spec/models/xxe_detection_batch_request_spec.rb +41 -0
- data/spec/models/xxe_detection_batch_response_spec.rb +41 -0
- data/spec/models/xxe_detection_request_item_spec.rb +59 -0
- data/spec/models/xxe_detection_result_spec.rb +47 -0
- metadata +38 -2
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::UrlHtmlSsrfResponseFull
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**clean_url** | **BOOLEAN** | True if the URL is clean, false if it is at risk of containing an SSRF threat or attack | [optional]
|
7
|
+
**http_response_code** | **Integer** | HTTP response code from the URL | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionBatchRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**request_items** | [**Array<XxeDetectionRequestItem>**](XxeDetectionRequestItem.md) | Multiple items to protect for XXE | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionBatchResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**result_items** | [**Array<XxeDetectionResult>**](XxeDetectionResult.md) | Results from performing a batch XSS protection operation | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionRequestItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**input_text** | **String** | Individual input text item to protect from XXE | [optional]
|
7
|
+
**allow_internet_urls** | **BOOLEAN** | Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false. | [optional]
|
8
|
+
**known_safe_urls** | **Array<String>** | Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe. | [optional]
|
9
|
+
**known_unsafe_urls** | **Array<String>** | Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe. | [optional]
|
10
|
+
|
11
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::XxeDetectionResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**contained_xxe** | **BOOLEAN** | True if the input contained XXE threats, false otherwise | [optional]
|
8
|
+
|
9
|
+
|
@@ -40,9 +40,11 @@ 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'
|
47
|
+
require 'cloudmersive-validate-api-client/models/is_admin_path_response'
|
46
48
|
require 'cloudmersive-validate-api-client/models/last_name_validation_request'
|
47
49
|
require 'cloudmersive-validate-api-client/models/last_name_validation_response'
|
48
50
|
require 'cloudmersive-validate-api-client/models/lead_enrichment_request'
|
@@ -58,8 +60,14 @@ require 'cloudmersive-validate-api-client/models/public_holiday_occurrence'
|
|
58
60
|
require 'cloudmersive-validate-api-client/models/public_holidays_response'
|
59
61
|
require 'cloudmersive-validate-api-client/models/reverse_geocode_address_request'
|
60
62
|
require 'cloudmersive-validate-api-client/models/reverse_geocode_address_response'
|
63
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_check_batch_request'
|
64
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_check_batch_response'
|
65
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_check_request_item'
|
66
|
+
require 'cloudmersive-validate-api-client/models/sql_injection_detection_result'
|
61
67
|
require 'cloudmersive-validate-api-client/models/timezone'
|
62
68
|
require 'cloudmersive-validate-api-client/models/tor_node_response'
|
69
|
+
require 'cloudmersive-validate-api-client/models/url_html_ssrf_request_full'
|
70
|
+
require 'cloudmersive-validate-api-client/models/url_html_ssrf_response_full'
|
63
71
|
require 'cloudmersive-validate-api-client/models/url_safety_check_request_full'
|
64
72
|
require 'cloudmersive-validate-api-client/models/url_safety_check_response_full'
|
65
73
|
require 'cloudmersive-validate-api-client/models/url_ssrf_request_batch'
|
@@ -91,6 +99,10 @@ require 'cloudmersive-validate-api-client/models/xss_protection_batch_request'
|
|
91
99
|
require 'cloudmersive-validate-api-client/models/xss_protection_batch_response'
|
92
100
|
require 'cloudmersive-validate-api-client/models/xss_protection_request_item'
|
93
101
|
require 'cloudmersive-validate-api-client/models/xss_protection_result'
|
102
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_batch_request'
|
103
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_batch_response'
|
104
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_request_item'
|
105
|
+
require 'cloudmersive-validate-api-client/models/xxe_detection_result'
|
94
106
|
|
95
107
|
# APIs
|
96
108
|
require 'cloudmersive-validate-api-client/api/address_api'
|
@@ -127,6 +127,60 @@ module CloudmersiveValidateApiClient
|
|
127
127
|
end
|
128
128
|
return data, status_code, headers
|
129
129
|
end
|
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
|
+
# @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
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @return [IsAdminPathResponse]
|
135
|
+
def domain_is_admin_path(value, opts = {})
|
136
|
+
data, _status_code, _headers = domain_is_admin_path_with_http_info(value, opts)
|
137
|
+
data
|
138
|
+
end
|
139
|
+
|
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
|
+
# @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
|
+
# @param [Hash] opts the optional parameters
|
144
|
+
# @return [Array<(IsAdminPathResponse, Fixnum, Hash)>] IsAdminPathResponse data, response status code and response headers
|
145
|
+
def domain_is_admin_path_with_http_info(value, opts = {})
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug 'Calling API: DomainApi.domain_is_admin_path ...'
|
148
|
+
end
|
149
|
+
# verify the required parameter 'value' is set
|
150
|
+
if @api_client.config.client_side_validation && value.nil?
|
151
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling DomainApi.domain_is_admin_path"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/validate/domain/url/is-admin-path'
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
165
|
+
|
166
|
+
# form parameters
|
167
|
+
form_params = {}
|
168
|
+
|
169
|
+
# http body (model)
|
170
|
+
post_body = @api_client.object_to_http_body(value)
|
171
|
+
auth_names = ['Apikey']
|
172
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
173
|
+
:header_params => header_params,
|
174
|
+
:query_params => query_params,
|
175
|
+
:form_params => form_params,
|
176
|
+
:body => post_body,
|
177
|
+
:auth_names => auth_names,
|
178
|
+
:return_type => 'IsAdminPathResponse')
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug "API called: DomainApi#domain_is_admin_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
181
|
+
end
|
182
|
+
return data, status_code, headers
|
183
|
+
end
|
130
184
|
# Check a URL for Phishing threats
|
131
185
|
# Checks if an input URL is at risk of being an Phishing (fake login page, or other page designed to collect information via social engineering) threat or attack.
|
132
186
|
# @param request Input URL request
|
@@ -505,6 +559,60 @@ module CloudmersiveValidateApiClient
|
|
505
559
|
end
|
506
560
|
return data, status_code, headers
|
507
561
|
end
|
562
|
+
# Check a URL for HTML embedded SSRF threats
|
563
|
+
# Checks if an input URL HTML is at risk of containing one or more embedded SSRF (Server-side request forgery) threats or attacks.
|
564
|
+
# @param request Input URL request
|
565
|
+
# @param [Hash] opts the optional parameters
|
566
|
+
# @return [UrlHtmlSsrfResponseFull]
|
567
|
+
def domain_url_html_ssrf_check(request, opts = {})
|
568
|
+
data, _status_code, _headers = domain_url_html_ssrf_check_with_http_info(request, opts)
|
569
|
+
data
|
570
|
+
end
|
571
|
+
|
572
|
+
# Check a URL for HTML embedded SSRF threats
|
573
|
+
# Checks if an input URL HTML is at risk of containing one or more embedded SSRF (Server-side request forgery) threats or attacks.
|
574
|
+
# @param request Input URL request
|
575
|
+
# @param [Hash] opts the optional parameters
|
576
|
+
# @return [Array<(UrlHtmlSsrfResponseFull, Fixnum, Hash)>] UrlHtmlSsrfResponseFull data, response status code and response headers
|
577
|
+
def domain_url_html_ssrf_check_with_http_info(request, opts = {})
|
578
|
+
if @api_client.config.debugging
|
579
|
+
@api_client.config.logger.debug 'Calling API: DomainApi.domain_url_html_ssrf_check ...'
|
580
|
+
end
|
581
|
+
# verify the required parameter 'request' is set
|
582
|
+
if @api_client.config.client_side_validation && request.nil?
|
583
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_url_html_ssrf_check"
|
584
|
+
end
|
585
|
+
# resource path
|
586
|
+
local_var_path = '/validate/domain/url/ssrf-threat-check/html-embedded'
|
587
|
+
|
588
|
+
# query parameters
|
589
|
+
query_params = {}
|
590
|
+
|
591
|
+
# header parameters
|
592
|
+
header_params = {}
|
593
|
+
# HTTP header 'Accept' (if needed)
|
594
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
595
|
+
# HTTP header 'Content-Type'
|
596
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
597
|
+
|
598
|
+
# form parameters
|
599
|
+
form_params = {}
|
600
|
+
|
601
|
+
# http body (model)
|
602
|
+
post_body = @api_client.object_to_http_body(request)
|
603
|
+
auth_names = ['Apikey']
|
604
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
605
|
+
:header_params => header_params,
|
606
|
+
:query_params => query_params,
|
607
|
+
:form_params => form_params,
|
608
|
+
:body => post_body,
|
609
|
+
:auth_names => auth_names,
|
610
|
+
:return_type => 'UrlHtmlSsrfResponseFull')
|
611
|
+
if @api_client.config.debugging
|
612
|
+
@api_client.config.logger.debug "API called: DomainApi#domain_url_html_ssrf_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
613
|
+
end
|
614
|
+
return data, status_code, headers
|
615
|
+
end
|
508
616
|
# Validate a URL syntactically
|
509
617
|
# Validate whether a URL is syntactically valid (does not check endpoint for validity). Accepts various types of input and produces a well-formed URL as output.
|
510
618
|
# @param request Input URL information
|
@@ -19,6 +19,171 @@ 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
|
76
|
+
# Check text input for SQL Injection (SQLI) attacks
|
77
|
+
# Detects SQL Injection (SQLI) attacks from text input.
|
78
|
+
# @param value User-facing text input.
|
79
|
+
# @param [Hash] opts the optional parameters
|
80
|
+
# @option opts [String] :detection_level Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives. Default is Normal (recommended).
|
81
|
+
# @return [SqlInjectionDetectionResult]
|
82
|
+
def text_input_check_sql_injection(value, opts = {})
|
83
|
+
data, _status_code, _headers = text_input_check_sql_injection_with_http_info(value, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check text input for SQL Injection (SQLI) attacks
|
88
|
+
# Detects SQL Injection (SQLI) attacks from text input.
|
89
|
+
# @param value User-facing text input.
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @option opts [String] :detection_level Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives. Default is Normal (recommended).
|
92
|
+
# @return [Array<(SqlInjectionDetectionResult, Fixnum, Hash)>] SqlInjectionDetectionResult data, response status code and response headers
|
93
|
+
def text_input_check_sql_injection_with_http_info(value, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_sql_injection ...'
|
96
|
+
end
|
97
|
+
# verify the required parameter 'value' is set
|
98
|
+
if @api_client.config.client_side_validation && value.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_sql_injection"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = '/validate/text-input/check/sql-injection'
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
113
|
+
header_params[:'detectionLevel'] = opts[:'detection_level'] if !opts[:'detection_level'].nil?
|
114
|
+
|
115
|
+
# form parameters
|
116
|
+
form_params = {}
|
117
|
+
|
118
|
+
# http body (model)
|
119
|
+
post_body = @api_client.object_to_http_body(value)
|
120
|
+
auth_names = ['Apikey']
|
121
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
122
|
+
:header_params => header_params,
|
123
|
+
:query_params => query_params,
|
124
|
+
:form_params => form_params,
|
125
|
+
:body => post_body,
|
126
|
+
:auth_names => auth_names,
|
127
|
+
:return_type => 'SqlInjectionDetectionResult')
|
128
|
+
if @api_client.config.debugging
|
129
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_sql_injection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
130
|
+
end
|
131
|
+
return data, status_code, headers
|
132
|
+
end
|
133
|
+
# Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
|
134
|
+
# Detects SQL Injection (SQLI) attacks from multiple text inputs. Output preverses order of input items.
|
135
|
+
# @param value User-facing text input.
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [SqlInjectionCheckBatchResponse]
|
138
|
+
def text_input_check_sql_injection_batch(value, opts = {})
|
139
|
+
data, _status_code, _headers = text_input_check_sql_injection_batch_with_http_info(value, opts)
|
140
|
+
data
|
141
|
+
end
|
142
|
+
|
143
|
+
# Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
|
144
|
+
# Detects SQL Injection (SQLI) attacks from multiple text inputs. Output preverses order of input items.
|
145
|
+
# @param value User-facing text input.
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<(SqlInjectionCheckBatchResponse, Fixnum, Hash)>] SqlInjectionCheckBatchResponse data, response status code and response headers
|
148
|
+
def text_input_check_sql_injection_batch_with_http_info(value, opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_sql_injection_batch ...'
|
151
|
+
end
|
152
|
+
# verify the required parameter 'value' is set
|
153
|
+
if @api_client.config.client_side_validation && value.nil?
|
154
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_sql_injection_batch"
|
155
|
+
end
|
156
|
+
# resource path
|
157
|
+
local_var_path = '/validate/text-input/check/sql-injection/batch'
|
158
|
+
|
159
|
+
# query parameters
|
160
|
+
query_params = {}
|
161
|
+
|
162
|
+
# header parameters
|
163
|
+
header_params = {}
|
164
|
+
# HTTP header 'Accept' (if needed)
|
165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
166
|
+
# HTTP header 'Content-Type'
|
167
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
168
|
+
|
169
|
+
# form parameters
|
170
|
+
form_params = {}
|
171
|
+
|
172
|
+
# http body (model)
|
173
|
+
post_body = @api_client.object_to_http_body(value)
|
174
|
+
auth_names = ['Apikey']
|
175
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
176
|
+
:header_params => header_params,
|
177
|
+
:query_params => query_params,
|
178
|
+
:form_params => form_params,
|
179
|
+
:body => post_body,
|
180
|
+
:auth_names => auth_names,
|
181
|
+
:return_type => 'SqlInjectionCheckBatchResponse')
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_sql_injection_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
22
187
|
# Check text input for Cross-Site-Scripting (XSS) attacks
|
23
188
|
# Detects XSS (Cross-Site-Scripting) attacks from text input.
|
24
189
|
# @param value User-facing text input.
|
@@ -74,7 +239,7 @@ module CloudmersiveValidateApiClient
|
|
74
239
|
return data, status_code, headers
|
75
240
|
end
|
76
241
|
# Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
|
77
|
-
# Detects XSS (Cross-Site-Scripting) attacks from multiple text
|
242
|
+
# Detects XSS (Cross-Site-Scripting) attacks from multiple text inputs. Output preverses order of input items.
|
78
243
|
# @param value User-facing text input.
|
79
244
|
# @param [Hash] opts the optional parameters
|
80
245
|
# @return [XssProtectionBatchResponse]
|
@@ -84,7 +249,7 @@ module CloudmersiveValidateApiClient
|
|
84
249
|
end
|
85
250
|
|
86
251
|
# Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
|
87
|
-
# Detects XSS (Cross-Site-Scripting) attacks from multiple text
|
252
|
+
# Detects XSS (Cross-Site-Scripting) attacks from multiple text inputs. Output preverses order of input items.
|
88
253
|
# @param value User-facing text input.
|
89
254
|
# @param [Hash] opts the optional parameters
|
90
255
|
# @return [Array<(XssProtectionBatchResponse, Fixnum, Hash)>] XssProtectionBatchResponse data, response status code and response headers
|
@@ -127,6 +292,123 @@ module CloudmersiveValidateApiClient
|
|
127
292
|
end
|
128
293
|
return data, status_code, headers
|
129
294
|
end
|
295
|
+
# Protect text input from XML External Entity (XXE) attacks
|
296
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
297
|
+
# @param value User-facing text input.
|
298
|
+
# @param [Hash] opts the optional parameters
|
299
|
+
# @option opts [BOOLEAN] :allow_internet_urls Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false.
|
300
|
+
# @option opts [String] :known_safe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe.
|
301
|
+
# @option opts [String] :known_unsafe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe.
|
302
|
+
# @return [XxeDetectionResult]
|
303
|
+
def text_input_check_xxe(value, opts = {})
|
304
|
+
data, _status_code, _headers = text_input_check_xxe_with_http_info(value, opts)
|
305
|
+
data
|
306
|
+
end
|
307
|
+
|
308
|
+
# Protect text input from XML External Entity (XXE) attacks
|
309
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
310
|
+
# @param value User-facing text input.
|
311
|
+
# @param [Hash] opts the optional parameters
|
312
|
+
# @option opts [BOOLEAN] :allow_internet_urls Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false.
|
313
|
+
# @option opts [String] :known_safe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe.
|
314
|
+
# @option opts [String] :known_unsafe_urls Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe.
|
315
|
+
# @return [Array<(XxeDetectionResult, Fixnum, Hash)>] XxeDetectionResult data, response status code and response headers
|
316
|
+
def text_input_check_xxe_with_http_info(value, opts = {})
|
317
|
+
if @api_client.config.debugging
|
318
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_xxe ...'
|
319
|
+
end
|
320
|
+
# verify the required parameter 'value' is set
|
321
|
+
if @api_client.config.client_side_validation && value.nil?
|
322
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling TextInputApi.text_input_check_xxe"
|
323
|
+
end
|
324
|
+
# resource path
|
325
|
+
local_var_path = '/validate/text-input/check/xxe'
|
326
|
+
|
327
|
+
# query parameters
|
328
|
+
query_params = {}
|
329
|
+
|
330
|
+
# header parameters
|
331
|
+
header_params = {}
|
332
|
+
# HTTP header 'Accept' (if needed)
|
333
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
334
|
+
# HTTP header 'Content-Type'
|
335
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
336
|
+
header_params[:'allowInternetUrls'] = opts[:'allow_internet_urls'] if !opts[:'allow_internet_urls'].nil?
|
337
|
+
header_params[:'knownSafeUrls'] = opts[:'known_safe_urls'] if !opts[:'known_safe_urls'].nil?
|
338
|
+
header_params[:'knownUnsafeUrls'] = opts[:'known_unsafe_urls'] if !opts[:'known_unsafe_urls'].nil?
|
339
|
+
|
340
|
+
# form parameters
|
341
|
+
form_params = {}
|
342
|
+
|
343
|
+
# http body (model)
|
344
|
+
post_body = @api_client.object_to_http_body(value)
|
345
|
+
auth_names = ['Apikey']
|
346
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
347
|
+
:header_params => header_params,
|
348
|
+
:query_params => query_params,
|
349
|
+
:form_params => form_params,
|
350
|
+
:body => post_body,
|
351
|
+
:auth_names => auth_names,
|
352
|
+
:return_type => 'XxeDetectionResult')
|
353
|
+
if @api_client.config.debugging
|
354
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_xxe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
355
|
+
end
|
356
|
+
return data, status_code, headers
|
357
|
+
end
|
358
|
+
# Protect text input from XML External Entity (XXE) attacks
|
359
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
360
|
+
# @param request
|
361
|
+
# @param [Hash] opts the optional parameters
|
362
|
+
# @return [XxeDetectionBatchResponse]
|
363
|
+
def text_input_check_xxe_batch(request, opts = {})
|
364
|
+
data, _status_code, _headers = text_input_check_xxe_batch_with_http_info(request, opts)
|
365
|
+
data
|
366
|
+
end
|
367
|
+
|
368
|
+
# Protect text input from XML External Entity (XXE) attacks
|
369
|
+
# Detects XXE (XML External Entity) attacks from text input.
|
370
|
+
# @param request
|
371
|
+
# @param [Hash] opts the optional parameters
|
372
|
+
# @return [Array<(XxeDetectionBatchResponse, Fixnum, Hash)>] XxeDetectionBatchResponse data, response status code and response headers
|
373
|
+
def text_input_check_xxe_batch_with_http_info(request, opts = {})
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug 'Calling API: TextInputApi.text_input_check_xxe_batch ...'
|
376
|
+
end
|
377
|
+
# verify the required parameter 'request' is set
|
378
|
+
if @api_client.config.client_side_validation && request.nil?
|
379
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling TextInputApi.text_input_check_xxe_batch"
|
380
|
+
end
|
381
|
+
# resource path
|
382
|
+
local_var_path = '/validate/text-input/check/xxe/batch'
|
383
|
+
|
384
|
+
# query parameters
|
385
|
+
query_params = {}
|
386
|
+
|
387
|
+
# header parameters
|
388
|
+
header_params = {}
|
389
|
+
# HTTP header 'Accept' (if needed)
|
390
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
391
|
+
# HTTP header 'Content-Type'
|
392
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
393
|
+
|
394
|
+
# form parameters
|
395
|
+
form_params = {}
|
396
|
+
|
397
|
+
# http body (model)
|
398
|
+
post_body = @api_client.object_to_http_body(request)
|
399
|
+
auth_names = ['Apikey']
|
400
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
401
|
+
:header_params => header_params,
|
402
|
+
:query_params => query_params,
|
403
|
+
:form_params => form_params,
|
404
|
+
:body => post_body,
|
405
|
+
:auth_names => auth_names,
|
406
|
+
:return_type => 'XxeDetectionBatchResponse')
|
407
|
+
if @api_client.config.debugging
|
408
|
+
@api_client.config.logger.debug "API called: TextInputApi#text_input_check_xxe_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
409
|
+
end
|
410
|
+
return data, status_code, headers
|
411
|
+
end
|
130
412
|
# Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
|
131
413
|
# Detects and removes XSS (Cross-Site-Scripting) attacks from text input through normalization. Returns the normalized result, as well as information on whether the original input contained an XSS risk.
|
132
414
|
# @param value User-facing text input.
|