rack 1.6.8 → 1.6.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rack might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2092f4e0636aec14fec649deaef4dbfb68361c1
4
- data.tar.gz: b2954fc517f0c648aae2332778c34c7464ecac8d
3
+ metadata.gz: 8a7555204e0e02409e7b76f1630035f5e6b7ee34
4
+ data.tar.gz: 4fb2212d6a2d723cb1138b524c212f05b37b52bd
5
5
  SHA512:
6
- metadata.gz: ab7e0851574c85179644c886a1b57ca2c28c97825e41e2ffb303cb648e0d6bf93fb903002a2ff4f5585ab656c9914e9a28aefc5f4b093b248c6151ef9f0d5dbc
7
- data.tar.gz: d1532e066641f8bfa48a6f635935a00cc6fdb2e22668ee41c68bfced203a174c433f11e322b9fc19be5135832eadbba9b6a1d653debf58911c32761396198630
6
+ metadata.gz: ef254cc814ce5b4e0468666286de2600060c717a18d77bec08d55c67205281ac3ba6078e16a6fc09c9b44146a7ba363db19fccaf3e74f386b8ad4bb5a72f8ac5
7
+ data.tar.gz: 3896beeaa4bf1d080b474abb8593416fe9082821426b386cb828d6960116d61c12240aa709a3466eefcee9a3598e857bbd8b85a955eeb2a0b30233b2f949e52c
@@ -20,7 +20,7 @@ module Rack
20
20
 
21
21
  # Return the Rack release as a dotted string.
22
22
  def self.release
23
- "1.6.8"
23
+ "1.6.9"
24
24
  end
25
25
  PATH_INFO = 'PATH_INFO'.freeze
26
26
  REQUEST_METHOD = 'REQUEST_METHOD'.freeze
@@ -38,6 +38,9 @@ module Rack
38
38
  def method_override_param(req)
39
39
  req.POST[METHOD_OVERRIDE_PARAM_KEY]
40
40
  rescue Utils::InvalidParameterError, Utils::ParameterTypeError
41
+ req.env["rack.errors"].puts "Invalid or incomplete POST params"
42
+ rescue EOFError
43
+ req.env["rack.errors"].puts "Bad request content body"
41
44
  end
42
45
  end
43
46
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rack"
3
- s.version = "1.6.8"
3
+ s.version = "1.6.9"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.summary = "a modular Ruby webserver interface"
6
6
  s.license = "MIT"
@@ -65,14 +65,27 @@ EOF
65
65
  "CONTENT_TYPE" => "multipart/form-data, boundary=AaB03x",
66
66
  "CONTENT_LENGTH" => input.size.to_s,
67
67
  :method => "POST", :input => input)
68
- begin
69
- app.call env
70
- rescue EOFError
71
- end
68
+ app.call env
72
69
 
73
70
  env["REQUEST_METHOD"].should.equal "POST"
74
71
  end
75
72
 
73
+ should "write error to RACK_ERRORS when given invalid multipart form data" do
74
+ input = <<EOF
75
+ --AaB03x\r
76
+ content-disposition: form-data; name="huge"; filename="huge"\r
77
+ EOF
78
+ env = Rack::MockRequest.env_for("/",
79
+ "CONTENT_TYPE" => "multipart/form-data, boundary=AaB03x",
80
+ "CONTENT_LENGTH" => input.size.to_s,
81
+ "rack.errors" => StringIO.new,
82
+ :method => "POST", :input => input)
83
+ Rack::MethodOverride.new(proc { [200, {"Content-Type" => "text/plain"}, []] }).call env
84
+
85
+ env["rack.errors"].rewind
86
+ env["rack.errors"].read.should =~ /Bad request content body/
87
+ end
88
+
76
89
  should "not modify REQUEST_METHOD for POST requests when the params are unparseable" do
77
90
  env = Rack::MockRequest.env_for("/", :method => "POST", :input => "(%bad-params%)")
78
91
  app.call env
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.8
4
+ version: 1.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neukirchen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-16 00:00:00.000000000 Z
11
+ date: 2018-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: bacon
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
- - - ">="
17
+ - - '>='
17
18
  - !ruby/object:Gem::Version
18
19
  version: '0'
19
- name: bacon
20
- prerelease: false
21
20
  type: :development
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
+ name: rake
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ">="
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
- name: rake
34
- prerelease: false
35
34
  type: :development
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: |
@@ -55,12 +55,6 @@ extra_rdoc_files:
55
55
  - KNOWN-ISSUES
56
56
  - HISTORY.md
57
57
  files:
58
- - COPYING
59
- - HISTORY.md
60
- - KNOWN-ISSUES
61
- - README.rdoc
62
- - Rakefile
63
- - SPEC
64
58
  - bin/rackup
65
59
  - contrib/rack.png
66
60
  - contrib/rack.svg
@@ -69,7 +63,6 @@ files:
69
63
  - example/lobster.ru
70
64
  - example/protectedlobster.rb
71
65
  - example/protectedlobster.ru
72
- - lib/rack.rb
73
66
  - lib/rack/auth/abstract/handler.rb
74
67
  - lib/rack/auth/abstract/request.rb
75
68
  - lib/rack/auth/basic.rb
@@ -93,7 +86,6 @@ files:
93
86
  - lib/rack/directory.rb
94
87
  - lib/rack/etag.rb
95
88
  - lib/rack/file.rb
96
- - lib/rack/handler.rb
97
89
  - lib/rack/handler/cgi.rb
98
90
  - lib/rack/handler/evented_mongrel.rb
99
91
  - lib/rack/handler/fastcgi.rb
@@ -103,6 +95,7 @@ files:
103
95
  - lib/rack/handler/swiftiplied_mongrel.rb
104
96
  - lib/rack/handler/thin.rb
105
97
  - lib/rack/handler/webrick.rb
98
+ - lib/rack/handler.rb
106
99
  - lib/rack/head.rb
107
100
  - lib/rack/lint.rb
108
101
  - lib/rack/lobster.rb
@@ -111,10 +104,10 @@ files:
111
104
  - lib/rack/methodoverride.rb
112
105
  - lib/rack/mime.rb
113
106
  - lib/rack/mock.rb
114
- - lib/rack/multipart.rb
115
107
  - lib/rack/multipart/generator.rb
116
108
  - lib/rack/multipart/parser.rb
117
109
  - lib/rack/multipart/uploaded_file.rb
110
+ - lib/rack/multipart.rb
118
111
  - lib/rack/nulllogger.rb
119
112
  - lib/rack/recursive.rb
120
113
  - lib/rack/reloader.rb
@@ -133,9 +126,9 @@ files:
133
126
  - lib/rack/static.rb
134
127
  - lib/rack/tempfile_reaper.rb
135
128
  - lib/rack/urlmap.rb
136
- - lib/rack/utils.rb
137
129
  - lib/rack/utils/okjson.rb
138
- - rack.gemspec
130
+ - lib/rack/utils.rb
131
+ - lib/rack.rb
139
132
  - test/builder/anything.rb
140
133
  - test/builder/comment.ru
141
134
  - test/builder/end.ru
@@ -236,28 +229,35 @@ files:
236
229
  - test/testrequest.rb
237
230
  - test/unregistered_handler/rack/handler/unregistered.rb
238
231
  - test/unregistered_handler/rack/handler/unregistered_long_one.rb
232
+ - COPYING
233
+ - KNOWN-ISSUES
234
+ - rack.gemspec
235
+ - Rakefile
236
+ - README.rdoc
237
+ - SPEC
238
+ - HISTORY.md
239
239
  homepage: http://rack.github.io/
240
240
  licenses:
241
241
  - MIT
242
242
  metadata: {}
243
- post_install_message:
243
+ post_install_message:
244
244
  rdoc_options: []
245
245
  require_paths:
246
246
  - lib
247
247
  required_ruby_version: !ruby/object:Gem::Requirement
248
248
  requirements:
249
- - - ">="
249
+ - - '>='
250
250
  - !ruby/object:Gem::Version
251
251
  version: '0'
252
252
  required_rubygems_version: !ruby/object:Gem::Requirement
253
253
  requirements:
254
- - - ">="
254
+ - - '>='
255
255
  - !ruby/object:Gem::Version
256
256
  version: '0'
257
257
  requirements: []
258
258
  rubyforge_project: rack
259
- rubygems_version: 2.6.8
260
- signing_key:
259
+ rubygems_version: 2.0.14.1
260
+ signing_key:
261
261
  specification_version: 4
262
262
  summary: a modular Ruby webserver interface
263
263
  test_files:
@@ -310,4 +310,3 @@ test_files:
310
310
  - test/spec_utils.rb
311
311
  - test/spec_version.rb
312
312
  - test/spec_webrick.rb
313
- has_rdoc: