rack-protection 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/protection/path_traversal.rb +4 -12
- data/lib/rack/protection/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49c4a270f8f0daacf434ea96c233c5d395400c916ff6e5681132f3ba21cde134
|
4
|
+
data.tar.gz: 4ea4e88a8858efaabfc5f690be497c5b26b97290472a476e38dbc18da238e733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f13d1a050a40196843a8e42fc7336023640ab895f2a2b1ad2401ba540ed469e4af6111dd8b124d81963c272f345a63ebddfafc6e0f172d2b2f854a9fbe7426d
|
7
|
+
data.tar.gz: 967d80b393755fdd7fd810547a3e0e8fdc3f8c17e02f78699fdbea378f29ef152dd99995007b39badafdfed371cd9fee738ba1b92591436ba1c94c3b295ed4c4
|
@@ -19,18 +19,10 @@ module Rack
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def cleanup(path)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
slash = '/'.encode(encoding)
|
27
|
-
backslash = '\\'.encode(encoding)
|
28
|
-
else
|
29
|
-
# Ruby 1.8
|
30
|
-
dot = '.'
|
31
|
-
slash = '/'
|
32
|
-
backslash = '\\'
|
33
|
-
end
|
22
|
+
encoding = path.encoding
|
23
|
+
dot = '.'.encode(encoding)
|
24
|
+
slash = '/'.encode(encoding)
|
25
|
+
backslash = '\\'.encode(encoding)
|
34
26
|
|
35
27
|
parts = []
|
36
28
|
unescaped = path.gsub(/%2e/i, dot).gsub(/%2f/i, slash).gsub(/%5c/i, backslash)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-protection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/sinatra/sinatra/graphs/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.7.
|
109
|
+
rubygems_version: 2.7.3
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Protect against typical web attacks, works with all Rack apps, including
|