libddwaf 1.2.1.0.0.beta1 → 1.3.0.0.0.beta1

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: ce1d3c829e33bcd555ab89c972cd169aea9faae5d320ab9111d11092e9dcdbc9
4
- data.tar.gz: '0785423054d10fc757993448985897091037cb97476430d9397089f2f73dc690'
3
+ metadata.gz: 16ccaee2b6e8daaf1f8e9a36735efcbae676e9187b9f05b4e5fe71caebb56e14
4
+ data.tar.gz: 65b0daae53f934308f54f8d5eb68a9364b41a79d663e861ab3f467717468df6c
5
5
  SHA512:
6
- metadata.gz: 42ba1288045e98493243f5abfe1bd5c88d955cc6c109210d21fccb45c0f8de84b5d36a0f0e9b073b84c05eb4b63725bb9320f5bf6034d464e0bd4d58bbe42368
7
- data.tar.gz: 3a28ac0d61aeaff6dbed900eea9b9640550adfd82b585fa717f37abc1c1d5210fda004d0a83682a4d027f00c1d93fffeaced07790faaae15802a0e27166570dc
6
+ metadata.gz: 0b88329d06a6418bd932019f3d68a8802728f240733f7961e38b9c28282eebc93d83c9dd6d8d2fbd626fbfbec0b2c20886b9985621c33031dac8fd104ef48814
7
+ data.tar.gz: 46315d9182a5ed04064e9599a6df3fc2cbfbdc2a5a0f2a47df55a5c734b3ed2ad9cbaa033916615539d7d6fcc70ba40048e2d972e86a7ea6774bbc79d24653aa
@@ -2,7 +2,7 @@ module Datadog
2
2
  module AppSec
3
3
  module WAF
4
4
  module VERSION
5
- BASE_STRING = '1.2.1'
5
+ BASE_STRING = '1.3.0'
6
6
  STRING = "#{BASE_STRING}.0.0.beta1"
7
7
  MINIMUM_RUBY_VERSION = '2.1'
8
8
  end
@@ -151,8 +151,19 @@ module Datadog
151
151
  typedef Object.by_ref, :ddwaf_rule
152
152
 
153
153
  class Config < ::FFI::Struct
154
- layout :maxArrayLength, :uint64,
155
- :maxMapDepth, :uint64
154
+ class Limits < ::FFI::Struct
155
+ layout :max_container_size, :uint32,
156
+ :max_container_depth, :uint32,
157
+ :max_string_length, :uint32
158
+ end
159
+
160
+ class Obfuscator < ::FFI::Struct
161
+ layout :key_regex, :string,
162
+ :value_regex, :string
163
+ end
164
+
165
+ layout :limits, Limits,
166
+ :obfuscator, Obfuscator
156
167
  end
157
168
 
158
169
  typedef Config.by_ref, :ddwaf_config
@@ -339,8 +350,9 @@ module Datadog
339
350
  class Handle
340
351
  attr_reader :handle_obj
341
352
 
342
- DEFAULT_MAX_ARRAY_LENGTH = 0
343
- DEFAULT_MAX_MAP_DEPTH = 0
353
+ DEFAULT_MAX_CONTAINER_SIZE = 0
354
+ DEFAULT_MAX_CONTAINER_DEPTH = 0
355
+ DEFAULT_MAX_STRING_LENGTH = 0
344
356
 
345
357
  def initialize(rule, config = {})
346
358
  rule_obj = Datadog::AppSec::WAF.ruby_to_object(rule)
@@ -353,8 +365,9 @@ module Datadog
353
365
  fail LibDDWAF::Error, 'Could not create config struct'
354
366
  end
355
367
 
356
- config_obj[:maxArrayLength] = config[:max_array_length] || DEFAULT_MAX_ARRAY_LENGTH
357
- config_obj[:maxMapDepth] = config[:max_map_depth] || DEFAULT_MAX_MAP_DEPTH
368
+ config_obj[:limits][:max_container_size] = config[:max_container_size] || DEFAULT_MAX_CONTAINER_SIZE
369
+ config_obj[:limits][:max_container_depth] = config[:max_container_depth] || DEFAULT_MAX_CONTAINER_DEPTH
370
+ config_obj[:limits][:max_string_length] = config[:max_string_length] || DEFAULT_MAX_STRING_LENGTH
358
371
 
359
372
  ruleset_info = LibDDWAF::RuleSetInfoNone
360
373
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libddwaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1.0.0.beta1
4
+ version: 1.3.0.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-18 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi