rack-protection 1.1.3 → 1.1.4

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.

Potentially problematic release.


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

@@ -12,7 +12,7 @@ module Rack
12
12
  class PathTraversal < Base
13
13
  def call(env)
14
14
  path_was = env["PATH_INFO"]
15
- env["PATH_INFO"] = cleanup path_was
15
+ env["PATH_INFO"] = cleanup path_was if path_was
16
16
  app.call env
17
17
  ensure
18
18
  env["PATH_INFO"] = path_was
@@ -4,7 +4,7 @@ module Rack
4
4
  VERSION
5
5
  end
6
6
 
7
- SIGNATURE = [1, 1, 3]
7
+ SIGNATURE = [1, 1, 4]
8
8
  VERSION = SIGNATURE.join('.')
9
9
 
10
10
  VERSION.extend Comparable
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # general infos
4
4
  s.name = "rack-protection"
5
- s.version = "1.1.3"
5
+ s.version = "1.1.4"
6
6
  s.description = "You should use protection!"
7
7
  s.homepage = "http://github.com/rkh/rack-protection"
8
8
  s.summary = s.description
@@ -19,5 +19,10 @@ describe Rack::Protection::PathTraversal do
19
19
  }.each do |a, b|
20
20
  it("replaces #{a.inspect} with #{b.inspect}") { get(a).body.should == b }
21
21
  end
22
+
23
+ it 'should be able to deal with PATH_INFO = nil (fcgi?)' do
24
+ app = Rack::Protection::PathTraversal.new(proc { 42 })
25
+ app.call({}).should be == 42
26
+ end
22
27
  end
23
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-protection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,7 +16,7 @@ date: 2011-10-04 00:00:00.000000000Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rack
19
- requirement: &2152903320 !ruby/object:Gem::Requirement
19
+ requirement: &2152664140 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: '0'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2152903320
27
+ version_requirements: *2152664140
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rack-test
30
- requirement: &2152902460 !ruby/object:Gem::Requirement
30
+ requirement: &2152663420 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
- version_requirements: *2152902460
38
+ version_requirements: *2152663420
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rspec
41
- requirement: &2152901540 !ruby/object:Gem::Requirement
41
+ requirement: &2152662520 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ~>
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '2.0'
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *2152901540
49
+ version_requirements: *2152662520
50
50
  description: You should use protection!
51
51
  email:
52
52
  - konstantin.mailinglists@googlemail.com