rack 1.6.5 → 1.6.6

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: 20cfbff780d181ef57fe493c5d9d52586cb65bae
4
- data.tar.gz: f57c4e0262ec3491683ea83e9823e9fe49973fbe
3
+ metadata.gz: 06de71024a96e8adb2d56a5a71d19c27108d9092
4
+ data.tar.gz: f88faaa3f6981a646989fd5c6e7284ae7ef9fdc7
5
5
  SHA512:
6
- metadata.gz: 2dc649b00ffb1811ad6c49a0aa9c48376b9f8dd3b5b15d1f19cd5005f60e31f0e7d00af3d17de5acd646bebd806ef16a61b111c0d3aa7303578c2b743c646509
7
- data.tar.gz: 74489fbf35da911d31a85f69737e9ac4aecb10d1cc05394041e0b5f24b323266d64e80481dcd4f8a3064b9d5e7c5ba10b2aa059b4d81eb5c13a459e1843ac3ab
6
+ metadata.gz: 87a659e1fa075bcbd285f8aa484dac13d60835c69b0346429d7973095446478dcc409965caf6c35e5e46f73df3db97b0faf261d75785ca9f6b0605baf73088bd
7
+ data.tar.gz: 9f956b12721c8f3858adb604fabe11e9bf823bfb750ff0da1d313ee597e461d2a022dc560a39a13ba279afbb0c6d6d763f15aba3fbf41e77a1b5c344e3b6b4d3
@@ -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.5"
23
+ "1.6.6"
24
24
  end
25
25
  PATH_INFO = 'PATH_INFO'.freeze
26
26
  REQUEST_METHOD = 'REQUEST_METHOD'.freeze
@@ -6,7 +6,6 @@ module Rack
6
6
 
7
7
  class Parser
8
8
  BUFSIZE = 16384
9
-
10
9
  DUMMY = Struct.new(:parse).new
11
10
 
12
11
  def self.create(env)
@@ -19,7 +18,7 @@ module Rack
19
18
  content_length = content_length.to_i if content_length
20
19
 
21
20
  tempfile = env['rack.multipart.tempfile_factory'] ||
22
- lambda { |filename, content_type| Tempfile.new(["RackMultipart", ::File.extname(filename)]) }
21
+ lambda { |filename, content_type| Tempfile.new(["RackMultipart", ::File.extname(filename.gsub("\0".freeze, '%00'.freeze))]) }
23
22
  bufsize = env['rack.multipart.buffer_size'] || BUFSIZE
24
23
 
25
24
  new($1, io, content_length, env, tempfile, bufsize)
@@ -1,4 +1,5 @@
1
1
  require 'optparse'
2
+ require 'fileutils'
2
3
 
3
4
 
4
5
  module Rack
@@ -352,7 +353,7 @@ module Rack
352
353
 
353
354
  def write_pid
354
355
  ::File.open(options[:pid], ::File::CREAT | ::File::EXCL | ::File::WRONLY ){ |f| f.write("#{Process.pid}") }
355
- at_exit { ::File.delete(options[:pid]) if ::File.exist?(options[:pid]) }
356
+ at_exit { ::FileUtils.rm_f(options[:pid]) }
356
357
  rescue Errno::EEXIST
357
358
  check_pid!
358
359
  retry
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rack"
3
- s.version = "1.6.5"
3
+ s.version = "1.6.6"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.summary = "a modular Ruby webserver interface"
6
6
  s.license = "MIT"
@@ -0,0 +1,7 @@
1
+ --AaB03x
2
+ Content-Type: image/jpeg
3
+ Content-Disposition: attachment; name="files"; filename="flowers.exe%00.jpg"
4
+ Content-Description: a complete map of the human genome
5
+
6
+ contents
7
+ --AaB03x--
@@ -261,6 +261,12 @@ describe Rack::Multipart do
261
261
  params["files"].size.should.equal 252
262
262
  end
263
263
 
264
+ should "parse multipart form with a null byte in the filename" do
265
+ env = Rack::MockRequest.env_for '/', multipart_fixture(:filename_with_null_byte)
266
+ params = Rack::Multipart.parse_multipart(env)
267
+ params["files"][:filename].should.equal "flowers.exe\u0000.jpg"
268
+ end
269
+
264
270
  should "parse multipart/mixed" do
265
271
  env = Rack::MockRequest.env_for("/", multipart_fixture(:mixed_files))
266
272
  params = Rack::Utils::Multipart.parse_multipart(env)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5
4
+ version: 1.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-10 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bacon
@@ -165,6 +165,7 @@ files:
165
165
  - test/multipart/filename_and_no_name
166
166
  - test/multipart/filename_with_escaped_quotes
167
167
  - test/multipart/filename_with_escaped_quotes_and_modification_param
168
+ - test/multipart/filename_with_null_byte
168
169
  - test/multipart/filename_with_percent_escaped_quotes
169
170
  - test/multipart/filename_with_unescaped_percentages
170
171
  - test/multipart/filename_with_unescaped_percentages2
@@ -255,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
256
  version: '0'
256
257
  requirements: []
257
258
  rubyforge_project: rack
258
- rubygems_version: 2.5.1
259
+ rubygems_version: 2.6.8
259
260
  signing_key:
260
261
  specification_version: 4
261
262
  summary: a modular Ruby webserver interface
@@ -309,4 +310,3 @@ test_files:
309
310
  - test/spec_utils.rb
310
311
  - test/spec_version.rb
311
312
  - test/spec_webrick.rb
312
- has_rdoc: