handle_invalid_percent_encoding_requests 1.0.1 → 1.0.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb049a64fb48ed3fd17247b81b6c6de6335d8269
|
4
|
+
data.tar.gz: 6f7d893f18c24d6b1e593dfe465e3070d7ed518e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a73ac5e8a4d7c769d2573e1778922c4eaf0364f8dd47edd3a89fb98d00fc6d6e820d9b265ec4360d4472d5a97c8b611bf859b6f5382cb243a310fdcac164714
|
7
|
+
data.tar.gz: f07afec281ef61f5f95eeebdae40089378935a8e51663a49d02e3416c199ce738a89fd9324d2061e6a233b0908c50943ca5d79fb2948a7d72b27ec5676e33520
|
@@ -20,16 +20,14 @@ module HandleInvalidPercentEncodingRequests
|
|
20
20
|
# Rescue from that specific ArgumentError
|
21
21
|
rescue ArgumentError => e
|
22
22
|
raise unless e.message =~ /invalid %-encoding/
|
23
|
+
|
24
|
+
@logger.info "Bad request. Returning 400 due to #{e.message} from request with env #{request.inspect}"
|
23
25
|
error_response
|
24
26
|
end
|
25
27
|
|
26
|
-
|
27
28
|
private
|
28
29
|
|
29
30
|
def error_response
|
30
|
-
@logger.info "Bad request. Returning 400 due to #{e.message}" + \
|
31
|
-
" from request with env #{request.inspect}"
|
32
|
-
|
33
31
|
headers = { 'Content-Type' => "text/plain; charset=utf-8" }
|
34
32
|
text = "Bad Request"
|
35
33
|
[400, headers, [text]]
|