wafris 1.1.9 → 1.1.10

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: 259b4944d7b5a3db3fc1b29575c871fae0519662db44c54b3558db9910f26d4a
4
- data.tar.gz: 9a6ba2a54a94551c8aee3f0e14ba03cdf969048b250825126b0af88e867ced5b
3
+ metadata.gz: 031d8144c5556cf40a2325f2299edfadbe4e9f1528d8150df8d87548b47ace09
4
+ data.tar.gz: baa7327a7cd765ccd5ebe098490e108f1e04d4ca66a57c6c19eead5a9ba4ff84
5
5
  SHA512:
6
- metadata.gz: 9915b54980a670e2c0888f290c9946a67abdbe884241aaeb087b0898710a0f36bb2c3be7ac9569e0c57881e29b07794dcc026cbf6bbf10965be26da14b3a04ba
7
- data.tar.gz: 6c86c916bead230540c6bb2921c7427a1e07a89f09cc8365a02131514386b351b2fce30a6d8886ab984ca1528140f1fe0d40fa2b838ed86ab7d0060ae63aee0b
6
+ metadata.gz: 8ea901efba9cb37e0756ffdb94c2f35d18927b78874da49dbb5c52d1cd06a5f152ecfac867fcd5232ae823e3809e24e6c7f7f8f1174c233cd16bb9c56d93a20f
7
+ data.tar.gz: 2f38a25d6cd4a16be22bd422e47fbb8cda1d1553794daf7da2fa5190d70f3ef4a04f5e5a382b66c36741ada88562d9cdbed697821b97aaa2fa5d1646c61ea72e
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
  local USE_TIMESTAMPS_AS_REQUEST_IDS = false
4
- local EXPIRATION_IN_SECONDS = 86400
4
+ local EXPIRATION_IN_SECONDS = tonumber(redis.call("HGET", "waf-settings", "expiration-time")) or 86400
5
5
  local EXPIRATION_OFFSET_IN_SECONDS = 3600
6
6
 
7
7
 
@@ -19,11 +19,11 @@ local function set_property_value_id_lookups(property_abbreviation, property_val
19
19
  property_id = redis.call("INCR", property_abbreviation .. "-id-counter")
20
20
  redis.call("SET", value_key, property_id)
21
21
  redis.call("SET", property_abbreviation .. "I" .. property_id, property_value)
22
- else
23
- redis.call("EXPIRE", value_key, EXPIRATION_IN_SECONDS + EXPIRATION_OFFSET_IN_SECONDS)
24
- redis.call("EXPIRE", property_abbreviation .. "I" .. property_id, EXPIRATION_IN_SECONDS + EXPIRATION_OFFSET_IN_SECONDS)
25
22
  end
26
23
 
24
+ redis.call("EXPIRE", value_key, EXPIRATION_IN_SECONDS + EXPIRATION_OFFSET_IN_SECONDS)
25
+ redis.call("EXPIRE", property_abbreviation .. "I" .. property_id, EXPIRATION_IN_SECONDS + EXPIRATION_OFFSET_IN_SECONDS)
26
+
27
27
  return property_id
28
28
  end
29
29
 
@@ -153,6 +153,7 @@ local function check_blocks(request)
153
153
  local rule_categories = {
154
154
  { category = "bi", func = ip_in_hash, args = { "rules-blocked-i", request.ip } },
155
155
  { category = "bc", func = ip_in_cidr_range, args = { "rules-blocked-cidrs-set", request.ip_decimal_lexical } },
156
+ { category = "bs", func = ip_in_cidr_range, args = { "rules-blocked-cidrs-subscriptions-set", request.ip_decimal_lexical } },
156
157
  { category = "bu", func = match_by_pattern, args = { "u", request.user_agent } },
157
158
  { category = "bp", func = match_by_pattern, args = { "p", request.path } },
158
159
  { category = "ba", func = match_by_pattern, args = { "a", request.parameters } },
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wafris
4
- VERSION = "1.1.9"
4
+ VERSION = "1.1.10"
5
5
  end
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.9
4
+ version: 1.1.10
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-12-17 00:00:00.000000000 Z
12
+ date: 2024-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: connection_pool