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: 7708b9477948acdc5579369457aa0b88f0cab985
4
- data.tar.gz: d72c8ab96a2308a539fdacc122bbb79364afccf7
3
+ metadata.gz: eb049a64fb48ed3fd17247b81b6c6de6335d8269
4
+ data.tar.gz: 6f7d893f18c24d6b1e593dfe465e3070d7ed518e
5
5
  SHA512:
6
- metadata.gz: fd1ecee174bb93762671de69006b19a401014610b48af8ab15639d65b3070c6961748ce063116e8a4adf9feafd0e3b122a96627307470966ab8b21783e0b6692
7
- data.tar.gz: fda4d4feaf2afddf20760f1d5b3b3e4ec13565bf1db60b1bb4b950fdc714f76ca271b3e9ab0456e857aea0fcc99923d5bea451c6a810a02224af1decccafd736
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]]
@@ -1,3 +1,4 @@
1
+ # Uses Semantic Versionning
1
2
  module HandleInvalidPercentEncodingRequests
2
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
3
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handle_invalid_percent_encoding_requests
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunny Ripert