rack-protection 3.0.2 → 3.0.4
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/ip_spoofing.rb +1 -1
- data/lib/rack/protection/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc2a9375b36c8e8f7948e6fb6fd0cb3ae2714c7bafb4f74f83802981838175cb
|
4
|
+
data.tar.gz: c11ddfca9afd14ce7264a4fbbe9daf25b937419deb0b8d9f338df51f58e2ebb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d66307d6eb431e3bee7b8b1ba17272de2e826707c734004349d70a748806b6b25cee6813504a0a2b84ef6e7bc3cd4cda3769edec697686b8e096615152dc32b3
|
7
|
+
data.tar.gz: 835fed194c6c5ca09656ea426ea445be81a4e8c3676f1754294edab0ae2760742a708b0d9b2499d2231793502646eccbaf905a89300177b55ed50c5c061dd205
|
@@ -16,7 +16,7 @@ module Rack
|
|
16
16
|
def accepts?(env)
|
17
17
|
return true unless env.include? 'HTTP_X_FORWARDED_FOR'
|
18
18
|
|
19
|
-
ips = env['HTTP_X_FORWARDED_FOR'].split(
|
19
|
+
ips = env['HTTP_X_FORWARDED_FOR'].split(',').map(&:strip)
|
20
20
|
return false if env.include?('HTTP_CLIENT_IP') && (!ips.include? env['HTTP_CLIENT_IP'])
|
21
21
|
return false if env.include?('HTTP_X_REAL_IP') && (!ips.include? env['HTTP_X_REAL_IP'])
|
22
22
|
|
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: 3.0.
|
4
|
+
version: 3.0.4
|
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: 2022-
|
11
|
+
date: 2022-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|