invalid_utf8_rejector 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 3a17f73dd60c6ba59fa575894284aef13a3ca1eb
4
- data.tar.gz: 6ce15f5f73ed3819194f63075f3daf32dcb91e98
3
+ metadata.gz: cd8e5a3f37ae47f1c9592964dc98871c3888b2b1
4
+ data.tar.gz: 71ee0ed7a83a1669370dd18ad9771f4a499a83b1
5
5
  SHA512:
6
- metadata.gz: 3845821becaa77b57e7cae3e40742166eb8d8064d60eebe33ffe27dfc5ff695f1f4d467625ab1084e9d72fce4ab24c63b93a41e1cbbcd2e182530bf11ca5ca44
7
- data.tar.gz: df226c3dba393f1f09a66231e059fd29c7f0e07bad1ff7f4584f2618fd07c2d833c019a2218d6768d0b330db22c9991df71f154f29fe2566391d19ebd587f7b2
6
+ metadata.gz: 0bc99842f379cd0b72740a4fef675eabe051e8ae9aa5c41a969a4cf0fdbfb44bec18830d3a75d26ee9e5a26fc666997f6c4351cac9eabe63461e4f9666efedcb
7
+ data.tar.gz: 0b24bf1b7aa896521bf8f9d1b3e5f344e06840c90cf7e6dbc5a8c694dc9653b362e9d8fd496201b9c49aae6db171eb5cd7b09eb71fe3f097f54dea74ed13672f
data/.travis.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
4
  - "1.9.3"
4
5
  - "2.1"
5
6
  - "2.2"
7
+ - "2.3.0"
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # 0.0.3
2
+
3
+ * Remove runtime dependency on rack (#10).
4
+
5
+ # 0.0.2
6
+
7
+ * Add handling for requests that include invalid % encoded strings.
8
+
9
+ # 0.0.1
10
+
11
+ * Initial release
@@ -18,8 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "rack", "~> 1.0"
22
-
23
21
  spec.add_development_dependency "bundler"
24
22
  spec.add_development_dependency "rake"
25
23
  spec.add_development_dependency "rack-test", "0.6.2"
@@ -1,3 +1,3 @@
1
1
  module InvalidUTF8Rejector
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -35,7 +35,7 @@ RSpec.describe InvalidUTF8Rejector::Middleware do
35
35
  end
36
36
 
37
37
  it "should reject invalid UTF-8 chars in the query_string without calling the app" do
38
- # Set params to nil. Without this, it defaults to empty hash, and rack-test tries to merge this with
38
+ # Set params to nil. Without this, it defaults to empty hash, and rack-test tries to merge this with
39
39
  # the given params which blows up with an invalid UTF-8 error before reaching our code
40
40
  get "/foo?ba%a0r", nil
41
41
  expect(last_response.status).to eq(400)
@@ -43,7 +43,7 @@ RSpec.describe InvalidUTF8Rejector::Middleware do
43
43
  end
44
44
 
45
45
  it "should reject malformed UTF-8 chars in the query_string without calling the app" do
46
- # Set params to nil. Without this, it defaults to empty hash, and rack-test tries to merge this with
46
+ # Set params to nil. Without this, it defaults to empty hash, and rack-test tries to merge this with
47
47
  # the given params which blows up with an invalid UTF-8 error before reaching our code
48
48
  get "/foo?bar=br54ba%9CAQ%C4%FD%928owse", nil
49
49
  expect(last_response.status).to eq(400)
@@ -53,13 +53,13 @@ RSpec.describe InvalidUTF8Rejector::Middleware do
53
53
 
54
54
  describe "handling invalid % encoded requests" do
55
55
  it "should reject invalid % encoding in the path without calling the app" do
56
- status, headers, body = raw_rack_get('/foo%+bar')
56
+ status, _, _ = raw_rack_get('/foo%+bar')
57
57
  expect(status).to eq(400)
58
58
  expect(@inner_app_called).to eq(false)
59
59
  end
60
60
 
61
61
  it "should reject invalid % encoding in the query_string without calling the app" do
62
- status, headers, body = raw_rack_get('/foo', 'bar%=baz')
62
+ status, _, _ = raw_rack_get('/foo', 'bar%=baz')
63
63
  expect(status).to eq(400)
64
64
  expect(@inner_app_called).to eq(false)
65
65
  end
@@ -75,6 +75,6 @@ RSpec.describe InvalidUTF8Rejector::Middleware do
75
75
  'SERVER_NAME' => 'example.org',
76
76
  'SERVER_PORT' => 80,
77
77
  }
78
- status, headers, body = app.call(env)
78
+ app.call(env)
79
79
  end
80
80
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invalid_utf8_rejector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Tomlins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-13 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rack
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -91,6 +77,7 @@ files:
91
77
  - ".gitignore"
92
78
  - ".rspec"
93
79
  - ".travis.yml"
80
+ - CHANGELOG.md
94
81
  - Gemfile
95
82
  - LICENCE.txt
96
83
  - README.md
@@ -122,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
109
  version: '0'
123
110
  requirements: []
124
111
  rubyforge_project:
125
- rubygems_version: 2.2.2
112
+ rubygems_version: 2.4.5.1
126
113
  signing_key:
127
114
  specification_version: 4
128
115
  summary: rack middleware to reject invalid UTF8 in requests