libddwaf 1.5.1.0.0-aarch64-linux → 1.6.2.0.0-aarch64-linux
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1081b4308607edb64b22feb3e22b98b32d6cc7a6927e256eea52e990f5f71e54
|
4
|
+
data.tar.gz: 1b8e868be861e0b195617c40c46ea0c68d892126709b00fb9c5550ffd36f7b9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a01b902573211c78ba826c4a04c25ef68bf191d602fd3549b82e6b2ae52c5a06c994796e7855a95072baa2655301b4d36d59e57b8e95c881b420fa672d787e3c
|
7
|
+
data.tar.gz: 55f6b0a8f6ae64fd89c96daa1f94c2ba885fd65bbfc636e7b4fb1319fd4d3a9d1a730abc2f29076cba392df87d1124acad876fe5a9b12471d2c1635f76d48458
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# 2023-02-03 v1.6.2.0.0
|
2
|
+
|
3
|
+
- Update to libddwaf 1.6.2
|
4
|
+
- Add specs for the getter functions
|
5
|
+
|
6
|
+
# 2023-02-01 v1.5.1.0.1
|
7
|
+
|
8
|
+
- Fix incorrect size in input string limit
|
9
|
+
- Fix object freeing on `update_rule_data` and `toggle_rules`
|
10
|
+
|
1
11
|
# 2022-10-04 v1.5.1.0.0
|
2
12
|
|
3
13
|
- Update to libddwaf 1.5.1
|
data/lib/datadog/appsec/waf.rb
CHANGED
@@ -182,6 +182,7 @@ module Datadog
|
|
182
182
|
attach_function :ddwaf_object_get_unsigned, [:ddwaf_object], :uint64
|
183
183
|
attach_function :ddwaf_object_get_signed, [:ddwaf_object], :int64
|
184
184
|
attach_function :ddwaf_object_get_index, [:ddwaf_object, :size_t], :ddwaf_object
|
185
|
+
attach_function :ddwaf_object_get_bool, [:ddwaf_object], :bool
|
185
186
|
|
186
187
|
## freeers
|
187
188
|
|
@@ -203,8 +204,8 @@ module Datadog
|
|
203
204
|
end
|
204
205
|
|
205
206
|
class Obfuscator < ::FFI::Struct
|
206
|
-
layout :key_regex, :pointer, # :charptr
|
207
|
-
:value_regex, :pointer # :charptr
|
207
|
+
layout :key_regex, :pointer, # should be :charptr
|
208
|
+
:value_regex, :pointer # should be :charptr
|
208
209
|
end
|
209
210
|
|
210
211
|
layout :limits, Limits,
|
@@ -539,15 +540,21 @@ module Datadog
|
|
539
540
|
end
|
540
541
|
|
541
542
|
def update_rule_data(data)
|
542
|
-
|
543
|
+
data_obj = Datadog::AppSec::WAF.ruby_to_object(data, coerce: false)
|
544
|
+
res = Datadog::AppSec::WAF::LibDDWAF.ddwaf_update_rule_data(@handle_obj, data_obj)
|
543
545
|
|
544
546
|
RESULT_CODE[res]
|
547
|
+
ensure
|
548
|
+
Datadog::AppSec::WAF::LibDDWAF.ddwaf_object_free(data_obj) if data_obj
|
545
549
|
end
|
546
550
|
|
547
551
|
def toggle_rules(map)
|
548
|
-
|
552
|
+
map_obj = Datadog::AppSec::WAF.ruby_to_object(map, coerce: false)
|
553
|
+
res = Datadog::AppSec::WAF::LibDDWAF.ddwaf_toggle_rules(@handle_obj, map_obj)
|
549
554
|
|
550
555
|
RESULT_CODE[res]
|
556
|
+
ensure
|
557
|
+
Datadog::AppSec::WAF::LibDDWAF.ddwaf_object_free(map_obj) if map_obj
|
551
558
|
end
|
552
559
|
|
553
560
|
private
|
@@ -627,7 +634,7 @@ module Datadog
|
|
627
634
|
|
628
635
|
max_container_size = LibDDWAF::DDWAF_MAX_CONTAINER_SIZE
|
629
636
|
max_container_depth = LibDDWAF::DDWAF_MAX_CONTAINER_DEPTH
|
630
|
-
max_string_length = LibDDWAF::
|
637
|
+
max_string_length = LibDDWAF::DDWAF_MAX_STRING_LENGTH
|
631
638
|
|
632
639
|
input_obj = Datadog::AppSec::WAF.ruby_to_object(input,
|
633
640
|
max_container_size: max_container_size,
|
data/vendor/libddwaf/{libddwaf-1.5.1-linux-aarch64 → libddwaf-1.6.2-linux-aarch64}/lib/libddwaf.so
RENAMED
Binary file
|
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.
|
4
|
+
version: 1.6.2.0.0
|
5
5
|
platform: aarch64-linux
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -42,7 +42,7 @@ files:
|
|
42
42
|
- lib/datadog/appsec/waf.rb
|
43
43
|
- lib/datadog/appsec/waf/version.rb
|
44
44
|
- lib/libddwaf.rb
|
45
|
-
- vendor/libddwaf/libddwaf-1.
|
45
|
+
- vendor/libddwaf/libddwaf-1.6.2-linux-aarch64/lib/libddwaf.so
|
46
46
|
homepage: https://github.com/DataDog/libddwaf-rb
|
47
47
|
licenses:
|
48
48
|
- BSD-3-Clause
|