Add ddwaf_object_stringl and ddwaf_object_map_addl#493
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #493 +/- ##
==========================================
+ Coverage 84.71% 84.82% +0.11%
==========================================
Files 190 190
Lines 9670 9214 -456
Branches 4186 4144 -42
==========================================
- Hits 8192 7816 -376
+ Misses 577 520 -57
+ Partials 901 878 -23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@Anilm3 the reason why I initially made this PR is that I got a security report saying some payloads might be ignored by the WAF due to >>> s = "0\x00thomas"
>>> print(s)
0thomas
>>> print(len(s))
8Do you think the library/consumer-side should handle those cases before calling into the WAF? What would be the recommended workaround? |
@KowalskiThomas that's not really the issue I was trying to raise, the object constructors let you follow either approach. The issue with this PR is that your python code is likely using libddwaf v1, while master is on v2, therefore those helpers are not necessary. In addition, the helpers already exist in libddwaf v1. |
|
Thanks for the comment and explanation -- I discussed with the Python folks and this isn't a problem for Python anyway, so I'll just close everything. Very sorry for the noise. |
What is this PR?
Needed for DataDog/dd-trace-py#18128.