libddwaf 1.9.0.0.0-java → 1.10.0.0.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/datadog/appsec/waf/version.rb +1 -1
- data/lib/datadog/appsec/waf.rb +9 -4
- data/vendor/libddwaf/{libddwaf-1.9.0-darwin-arm64 → libddwaf-1.10.0-darwin-arm64}/lib/libddwaf.dylib +0 -0
- data/vendor/libddwaf/{libddwaf-1.9.0-darwin-x86_64 → libddwaf-1.10.0-darwin-x86_64}/lib/libddwaf.dylib +0 -0
- data/vendor/libddwaf/{libddwaf-1.9.0-linux-aarch64 → libddwaf-1.10.0-linux-aarch64}/lib/libddwaf.so +0 -0
- data/vendor/libddwaf/{libddwaf-1.9.0-linux-x86_64 → libddwaf-1.10.0-linux-x86_64}/lib/libddwaf.so +0 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f22f410eb5a68fe9d23a9c08703e8aa1fce8811c5d411427444a5b4e0ca5555
|
4
|
+
data.tar.gz: ff895b4796b05bda7da88c04aa74399089f1a3a82917af8286b8f5733a132e2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 903cb14667ae70f0cd7c721696433e243491061aea3f607df1ba74efba0a8b034f9ac9ee77ded7b477d120d299032b0727a11baff88e2572460e20382bb6e87a
|
7
|
+
data.tar.gz: d5ee811a7bfcdf1bd6bea1b346ae4a2c8641251fe491239379ef12f9775c3353b8e4cb8f46ce52f7a53327b7458dc614c8cd0c6f2e9dda9b04a8aac0c946fdcc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
# 2023-06-13 v.1.9.0.0.1
|
2
|
+
|
3
|
+
- Handle invalid encoding
|
4
|
+
- Ensure strings passed to libddwaf are not clipped inside a code point
|
5
|
+
- Ensure strings passed to libddwaf are UTF-8
|
6
|
+
|
7
|
+
# 2023-05-17 v1.9.0.0.0
|
8
|
+
|
9
|
+
- Update to libddwaf 1.9.0
|
10
|
+
- Support [`custom_rules`](https://github.com/DataDog/libddwaf/pull/154)
|
11
|
+
|
1
12
|
# 2023-03-03 v1.8.2.0.0
|
2
13
|
|
3
14
|
- Update to libddwaf 1.8.2
|
data/lib/datadog/appsec/waf.rb
CHANGED
@@ -4,6 +4,7 @@ require 'datadog/appsec/waf/version'
|
|
4
4
|
|
5
5
|
module Datadog
|
6
6
|
module AppSec
|
7
|
+
# rubocop:disable Metrics/ModuleLength
|
7
8
|
module WAF
|
8
9
|
module LibDDWAF
|
9
10
|
class Error < StandardError
|
@@ -281,9 +282,9 @@ module Datadog
|
|
281
282
|
|
282
283
|
attach_function :ddwaf_set_log_cb, [:ddwaf_log_cb, :ddwaf_log_level], :bool
|
283
284
|
|
284
|
-
DEFAULT_MAX_CONTAINER_SIZE =
|
285
|
-
DEFAULT_MAX_CONTAINER_DEPTH =
|
286
|
-
DEFAULT_MAX_STRING_LENGTH =
|
285
|
+
DEFAULT_MAX_CONTAINER_SIZE = 256
|
286
|
+
DEFAULT_MAX_CONTAINER_DEPTH = 20
|
287
|
+
DEFAULT_MAX_STRING_LENGTH = 16_384 # in bytes, UTF-8 worst case being 4x size in terms of code point)
|
287
288
|
|
288
289
|
DDWAF_MAX_CONTAINER_SIZE = 256
|
289
290
|
DDWAF_MAX_CONTAINER_DEPTH = 20
|
@@ -296,6 +297,7 @@ module Datadog
|
|
296
297
|
LibDDWAF.ddwaf_get_version
|
297
298
|
end
|
298
299
|
|
300
|
+
# rubocop:disable Metrics/MethodLength
|
299
301
|
def self.ruby_to_object(val, max_container_size: nil, max_container_depth: nil, max_string_length: nil, coerce: true)
|
300
302
|
case val
|
301
303
|
when Array
|
@@ -349,7 +351,8 @@ module Datadog
|
|
349
351
|
obj
|
350
352
|
when String
|
351
353
|
obj = LibDDWAF::Object.new
|
352
|
-
|
354
|
+
encoded_val = val.to_s.encode('utf-8', invalid: :replace, undef: :replace)
|
355
|
+
val = encoded_val[0, max_string_length] if max_string_length
|
353
356
|
str = val.to_s
|
354
357
|
res = LibDDWAF.ddwaf_object_stringl(obj, str, str.bytesize)
|
355
358
|
if res.null?
|
@@ -405,6 +408,7 @@ module Datadog
|
|
405
408
|
ruby_to_object(''.freeze)
|
406
409
|
end
|
407
410
|
end
|
411
|
+
# rubocop:enable Metrics/MethodLength
|
408
412
|
|
409
413
|
def self.object_to_ruby(obj)
|
410
414
|
case obj[:type]
|
@@ -699,5 +703,6 @@ module Datadog
|
|
699
703
|
end
|
700
704
|
end
|
701
705
|
end
|
706
|
+
# rubocop:enable Metrics/ModuleLength
|
702
707
|
end
|
703
708
|
end
|
data/vendor/libddwaf/{libddwaf-1.9.0-darwin-arm64 → libddwaf-1.10.0-darwin-arm64}/lib/libddwaf.dylib
RENAMED
Binary file
|
Binary file
|
data/vendor/libddwaf/{libddwaf-1.9.0-linux-aarch64 → libddwaf-1.10.0-linux-aarch64}/lib/libddwaf.so
RENAMED
Binary file
|
data/vendor/libddwaf/{libddwaf-1.9.0-linux-x86_64 → libddwaf-1.10.0-linux-x86_64}/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.10.0.0.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -42,10 +42,10 @@ 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.
|
46
|
-
- vendor/libddwaf/libddwaf-1.
|
47
|
-
- vendor/libddwaf/libddwaf-1.
|
48
|
-
- vendor/libddwaf/libddwaf-1.
|
45
|
+
- vendor/libddwaf/libddwaf-1.10.0-darwin-arm64/lib/libddwaf.dylib
|
46
|
+
- vendor/libddwaf/libddwaf-1.10.0-darwin-x86_64/lib/libddwaf.dylib
|
47
|
+
- vendor/libddwaf/libddwaf-1.10.0-linux-aarch64/lib/libddwaf.so
|
48
|
+
- vendor/libddwaf/libddwaf-1.10.0-linux-x86_64/lib/libddwaf.so
|
49
49
|
homepage: https://github.com/DataDog/libddwaf-rb
|
50
50
|
licenses:
|
51
51
|
- BSD-3-Clause
|