Skip to content

Commit e3bd4fb

Browse files
committed
Merge remote-tracking branch 'origin/main' into brettlangdon/macro.wheels
2 parents 337d4e0 + ea8e783 commit e3bd4fb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ddtrace/appsec/_common_module_patches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def wrapped_open_ED4CF71136E15EBF(original_open_callable, instance, args, kwargs
222222
# api10 response handler for regular reponses
223223
if response.__class__.__name__ == "HTTPResponse":
224224
addresses = {
225-
"DOWN_RES_STATUS": response.status,
225+
"DOWN_RES_STATUS": str(response.status),
226226
"DOWN_RES_HEADERS": _build_headers(response.getheaders()),
227227
}
228228
if use_body:
@@ -242,7 +242,7 @@ def wrapped_open_ED4CF71136E15EBF(original_open_callable, instance, args, kwargs
242242
response_headers = None
243243
if status_code is not None or response_headers is not None:
244244
call_waf_callback(
245-
{"DOWN_RES_STATUS": status_code, "DOWN_RES_HEADERS": response_headers},
245+
{"DOWN_RES_STATUS": str(status_code), "DOWN_RES_HEADERS": response_headers},
246246
rule_type=EXPLOIT_PREVENTION.TYPE.SSRF,
247247
)
248248
raise
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
fixes:
3+
- |
4+
AAP: make sure the status code for downstream requests is properly sent to libddwaf.

0 commit comments

Comments
 (0)