Commit ef2e9f0
authored
Fix NullPointerException log in AppSec (#9355)
What Does This Do
Modifies WafModule#buildEvents to safely handle actionWithData.data being null.
Motivation
Fix #9346
Additional Notes
The current version of libddwaf may return null in the data field of actionWithData. This was previously not handled and could cause unexpected logged exceptions. The method now explicitly checks for null to prevent this.1 parent 8d4316a commit ef2e9f0
File tree
2 files changed
+18
-0
lines changed- dd-java-agent/appsec/src
- main/java/com/datadog/appsec/ddwaf
- test/groovy/com/datadog/appsec/ddwaf
2 files changed
+18
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
560 | 565 | | |
561 | 566 | | |
562 | 567 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1682 | 1682 | | |
1683 | 1683 | | |
1684 | 1684 | | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
1685 | 1698 | | |
1686 | 1699 | | |
1687 | 1700 | | |
| |||
0 commit comments