wafris 2.0.7 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wafris/proxy_filter.rb +9 -0
- data/lib/wafris/version.rb +1 -1
- data/lib/wafris/wafris_request.rb +2 -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: '090c73e4e16d97aa2076a9bed6a68cc4353d0f490f2954d7263bf919dd5cefee'
|
4
|
+
data.tar.gz: 3365dab3150d151be29735b95862adc7cda7e91142ddc05fa84d91bb9d7b59a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f45d69161062ff57688c30e300bceae2425e80e7e954458317c248580ad64f7d580f2c25f36428e5123468b26d74b37ee8643ce250c4f5902da33a0d9c56d370
|
7
|
+
data.tar.gz: 3c9480600f9f51624db89f2ceb34483df8ab3f79d6e0153f810bb88343c39d93bcb72dd8f73c149539910382abe4a5eb029c2446f56f5f66e936d43f270f8aa2
|
data/lib/wafris/proxy_filter.rb
CHANGED
@@ -37,6 +37,15 @@ module Wafris
|
|
37
37
|
/\A172\.(1[6-9]|2[0-9]|3[01])#{valid_ipv4_octet}{2}\z/, # private IPv4 range 172.16.0.0 .. 172.31.255.255
|
38
38
|
/\A192\.168#{valid_ipv4_octet}{2}\z/, # private IPv4 range 192.168.x.x
|
39
39
|
/\Alocalhost\z|\Aunix(\z|:)/i, # localhost hostname, and unix domain sockets
|
40
|
+
# Cloudflare IPs: https://www.cloudflare.com/en-au/ips/
|
41
|
+
/\A103\.21\.24[4-7]#{valid_ipv4_octet}\z/, # 103.21.244.0/22
|
42
|
+
/\A103\.22\.20[0-3]#{valid_ipv4_octet}\z/, # 103.22.200.0/22
|
43
|
+
/\A103\.31\.[4-7]#{valid_ipv4_octet}\z/, # 103.31.4.0/22
|
44
|
+
/\A104\.(1[6-9]|2[0-3])#{valid_ipv4_octet}{2}\z/, # 104.16.0.0/13
|
45
|
+
/\A104\.2[4-7]#{valid_ipv4_octet}{2}\z/, # 104.24.0.0/14
|
46
|
+
/\A108\.162\.192#{valid_ipv4_octet}\z/, # 108.162.192.0/18
|
47
|
+
/\A162\.15[8-9]#{valid_ipv4_octet}{2}\z/, # 162.158.0.0/15
|
48
|
+
/\A172\.(6[4-9]|7[0-1])#{valid_ipv4_octet}{2}\z/, # 172.64.0.0/13
|
40
49
|
*user_defined_proxies
|
41
50
|
)
|
42
51
|
|
data/lib/wafris/version.rb
CHANGED
@@ -16,8 +16,9 @@ module Wafris
|
|
16
16
|
@request_id = env.fetch("action_dispatch.request_id", SecureRandom.uuid.to_s)
|
17
17
|
@request_timestamp = Time.now.utc.to_i
|
18
18
|
|
19
|
+
pos = request.body&.pos
|
19
20
|
@body = encode_to_utf8(request.body&.read)
|
20
|
-
request.body&.rewind
|
21
|
+
request.body&.rewind if request.body&.pos != pos
|
21
22
|
end
|
22
23
|
|
23
24
|
def data(treatment:, category:, rule:)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wafris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Buckbee
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|