wafris 0.5.1 → 0.5.2
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.
- checksums.yaml +4 -4
- data/lib/lua/dist/wafris_core.lua +4 -2
- data/lib/wafris/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c6b329d3746bbf4c287cb873197fdb2ffa624d234985ca776053a9d5c9cf7b
|
4
|
+
data.tar.gz: 5a8640a929b7d940d2439e6c27bd2612b353057dac92e3da6947f2a75c8c3c55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a3fef28735edcf3fda097bca89158c27205a7fdef8326d96f86c8e4306851210f334b5737ca0bbc909da961095fd2f88d7c2af53e99dd8df3e82d10bab8d2eb
|
7
|
+
data.tar.gz: 83e364033093b4b0c87f6c08b0aa52128c88d0e94efb830f397c48eb8ddea33d4bbca1295f940934faf0b01fd7001446998323ade3324f99bc617e9c30a387ab
|
@@ -99,10 +99,12 @@ increment_timebucket_for("host:", current_timebucket, host)
|
|
99
99
|
-- BLOCKING LOGIC
|
100
100
|
-- Safelist Range Check
|
101
101
|
-- TODO: ZRANGEBYSCORE is deprecated in Redis 6.2+. Replace with ZRANGE
|
102
|
-
if not next(redis.call("ZRANGEBYSCORE", "allowed_ranges", client_ip_to_decimal, "+inf", "LIMIT", 0, 1)) == nil then
|
102
|
+
if not (next(redis.call("ZRANGEBYSCORE", "allowed_ranges", client_ip_to_decimal, "+inf", "LIMIT", 0, 1)) == nil) then
|
103
103
|
return "Allowed"
|
104
104
|
-- Blocklist Range Check
|
105
|
-
elseif
|
105
|
+
elseif
|
106
|
+
not (next(redis.call("ZRANGEBYSCORE", "blocked_ranges", client_ip_to_decimal, "+inf", "LIMIT", 0, 1)) == nil)
|
107
|
+
then
|
106
108
|
increment_timebucket_for("wafris:blocked:", current_timebucket, client_ip)
|
107
109
|
return "Blocked"
|
108
110
|
-- No Matches
|
data/lib/wafris/version.rb
CHANGED