rack-protection 3.0.1 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05fc5bb37ba46f92e6546fdbfaa57ca4c82edc67567bed960cdaf4de5cca3fa3
4
- data.tar.gz: 2790e639e1e9dbdf698e13a0df81c39b406dc8571c1d012fc0fae0600b3086c0
3
+ metadata.gz: 7f738b67e1d5a3359b664caf4e87833536892df02ee3725afc13b030c1fc14dd
4
+ data.tar.gz: ba0480b9df4b3ee673f04d61e7bc9f5994bd6009a0745b0459ea9974ea1047da
5
5
  SHA512:
6
- metadata.gz: 3eb5a3f954059b911c4da2639539465b4b149572d9848a770e587ee9ee7a615080fc79a8aa640ea69669cb2278df1cdef6ea56d22002f7970c4de5a448fc2014
7
- data.tar.gz: 24078381a4cfcf82813a499c07528bd659aad08db324690f13d2800888fde9352eab9a51509f5c38c3312cdcff0e463ac3a29f073f8793d77e2348ed6406c09b
6
+ metadata.gz: fa8d4db26b6b9c0fce6dc4c1812b5a003277e9133e2e78f2c62f402444edd2dd9ee72a92be299d87b87247c39abb35473b2abbf88d97d12cbfe8eb4ef343b228
7
+ data.tar.gz: 4caa9ecbcce5cdc86f2312b3648a91ffd0fc7ebbf559e4f5cc9553c3a4c5779863c538205bbe23e81d39194a01f3d382ec23ee59fee7785b14f7fbea95fdfdce
@@ -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(/\s*,\s*/)
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rack
4
4
  module Protection
5
- VERSION = '3.0.0'
5
+ VERSION = '3.0.2'
6
6
  end
7
7
  end
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.1
4
+ version: 3.0.3
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-09-26 00:00:00.000000000 Z
11
+ date: 2022-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack