wafris 1.1.1 → 1.1.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 +6 -1
- data/lib/wafris/log_suppressor.rb +1 -1
- data/lib/wafris/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: 7590310d437ae2574c37907b8c285e236b3e22686769cb2a5043a1e8a4c6171b
|
4
|
+
data.tar.gz: 4bbc22d46692a7505b37845a5c39d8b5197441c6dc8b8bf61b12622fa690d9b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89063fcce8dcd2f35c10651bccc9de6b517f2925194493673fa6e2fa672eba4a6c3bfc1444624c957a70cd3d3b401cbc743ad13a0d8981fd5f18bcbba8eb02c8
|
7
|
+
data.tar.gz: 61b32244a41efdca5cffa93f753e8bed5fdbf23849fb4f0f8773083493c3bb26e0a9cc23480584d41e674a1cb0fa749faafa428af2c741ee9d12c5fb8078c1d4
|
@@ -73,13 +73,18 @@ local function ip_in_cidr_range(cidr_set, ip_decimal_lexical)
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
local function escapePattern(s)
|
77
|
+
local patternSpecials = "[%^%$%(%)%%%.%[%]%*%+%-%?]"
|
78
|
+
return s:gsub(patternSpecials, "%%%1")
|
79
|
+
end
|
80
|
+
|
76
81
|
local function match_by_pattern(property_abbreviation, property_value)
|
77
82
|
local hash_name = "rules-blocked-" .. property_abbreviation
|
78
83
|
|
79
84
|
local patterns = redis.call('HKEYS', hash_name)
|
80
85
|
|
81
86
|
for _, pattern in ipairs(patterns) do
|
82
|
-
if string.find(property_value, pattern) then
|
87
|
+
if string.find(string.lower(property_value), string.lower(escapePattern(pattern))) then
|
83
88
|
return pattern
|
84
89
|
end
|
85
90
|
end
|
data/lib/wafris/version.rb
CHANGED
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: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micahel Buckbee
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-09-
|
12
|
+
date: 2023-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: connection_pool
|