libddwaf 1.5.1.0.0-aarch64-linux → 1.5.1.0.1-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: a81ee2e5601f967754516937cd9b12327df131525a8e9ac1f6024447d4951c7b
4
- data.tar.gz: 399f3d4838534d790443799e8dd033a2ca623dd64a665691464ad02397705c8f
3
+ metadata.gz: cfbcbddb9f76414f4672bb9474af7d3d7011b998e63b7966efbbf81547779575
4
+ data.tar.gz: ea30191393919988816793f525913ca29b81ee5566926762385f80511233cb29
5
5
  SHA512:
6
- metadata.gz: dd5e933f5811305b6a840ca61e3e5dddd0e4b2e8a2ed8f4267542ef16722b5d6c8ab7984ab5373042cb6d5d3348856ab01b2a8f7d24c454ee35b676e0bfb1da5
7
- data.tar.gz: ce3fe803f2959594b0caa688ce6221b7ad9df30fb5c9b0fa98ac31944d31a568d968e4cec89f7b043d9c42f628c5a564122f738687d1947b5c46a170075d8cd6
6
+ metadata.gz: ffb73d935a12bdd2f75ae8f1ee4af5609c2dd02c5765efe8da3fe3937f6dd03704aaabb8435e358172eb794b5ed46b9383e993829498ae9ec3dcbb0e6da9fff5
7
+ data.tar.gz: 45f254927cc43f902182d64b6193be6e802bffdf394d9ca8971f71e82c408e578ac7e5e3a7755edf766bf5cab74d79f557a5ee4838c8a13757311833a7714141
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 2023-02-01 v1.5.1.0.1
2
+
3
+ - Fix incorrect size in input string limit
4
+ - Fix object freeing on `update_rule_data` and `toggle_rules`
5
+
1
6
  # 2022-10-04 v1.5.1.0.0
2
7
 
3
8
  - Update to libddwaf 1.5.1
@@ -3,7 +3,7 @@ module Datadog
3
3
  module WAF
4
4
  module VERSION
5
5
  BASE_STRING = '1.5.1'
6
- STRING = "#{BASE_STRING}.0.0"
6
+ STRING = "#{BASE_STRING}.0.1"
7
7
  MINIMUM_RUBY_VERSION = '2.1'
8
8
  end
9
9
  end
@@ -203,8 +203,8 @@ module Datadog
203
203
  end
204
204
 
205
205
  class Obfuscator < ::FFI::Struct
206
- layout :key_regex, :pointer, # :charptr
207
- :value_regex, :pointer # :charptr
206
+ layout :key_regex, :pointer, # should be :charptr
207
+ :value_regex, :pointer # should be :charptr
208
208
  end
209
209
 
210
210
  layout :limits, Limits,
@@ -539,15 +539,21 @@ module Datadog
539
539
  end
540
540
 
541
541
  def update_rule_data(data)
542
- res = Datadog::AppSec::WAF::LibDDWAF.ddwaf_update_rule_data(@handle_obj, Datadog::AppSec::WAF.ruby_to_object(data, coerce: false))
542
+ data_obj = Datadog::AppSec::WAF.ruby_to_object(data, coerce: false)
543
+ res = Datadog::AppSec::WAF::LibDDWAF.ddwaf_update_rule_data(@handle_obj, data_obj)
543
544
 
544
545
  RESULT_CODE[res]
546
+ ensure
547
+ Datadog::AppSec::WAF::LibDDWAF.ddwaf_object_free(data_obj) if data_obj
545
548
  end
546
549
 
547
550
  def toggle_rules(map)
548
- res = Datadog::AppSec::WAF::LibDDWAF.ddwaf_toggle_rules(@handle_obj, Datadog::AppSec::WAF.ruby_to_object(map, coerce: false))
551
+ map_obj = Datadog::AppSec::WAF.ruby_to_object(map, coerce: false)
552
+ res = Datadog::AppSec::WAF::LibDDWAF.ddwaf_toggle_rules(@handle_obj, map_obj)
549
553
 
550
554
  RESULT_CODE[res]
555
+ ensure
556
+ Datadog::AppSec::WAF::LibDDWAF.ddwaf_object_free(map_obj) if map_obj
551
557
  end
552
558
 
553
559
  private
@@ -627,7 +633,7 @@ module Datadog
627
633
 
628
634
  max_container_size = LibDDWAF::DDWAF_MAX_CONTAINER_SIZE
629
635
  max_container_depth = LibDDWAF::DDWAF_MAX_CONTAINER_DEPTH
630
- max_string_length = LibDDWAF::DDWAF_MAX_CONTAINER_SIZE
636
+ max_string_length = LibDDWAF::DDWAF_MAX_STRING_LENGTH
631
637
 
632
638
  input_obj = Datadog::AppSec::WAF.ruby_to_object(input,
633
639
  max_container_size: max_container_size,
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.5.1.0.0
4
+ version: 1.5.1.0.1
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: 2022-10-04 00:00:00.000000000 Z
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi