Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ddtrace/appsec/_common_module_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def wrapped_open_ED4CF71136E15EBF(original_open_callable, instance, args, kwargs
# api10 response handler for regular reponses
if response.__class__.__name__ == "HTTPResponse":
addresses = {
"DOWN_RES_STATUS": response.status,
"DOWN_RES_STATUS": str(response.status),
"DOWN_RES_HEADERS": _build_headers(response.getheaders()),
}
if use_body:
Expand All @@ -242,7 +242,7 @@ def wrapped_open_ED4CF71136E15EBF(original_open_callable, instance, args, kwargs
response_headers = None
if status_code is not None or response_headers is not None:
call_waf_callback(
{"DOWN_RES_STATUS": status_code, "DOWN_RES_HEADERS": response_headers},
{"DOWN_RES_STATUS": str(status_code), "DOWN_RES_HEADERS": response_headers},
rule_type=EXPLOIT_PREVENTION.TYPE.SSRF,
)
raise
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/api10_status_code-deb7bbc4c0c2a68e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
AAP: make sure the status code for downstream requests is properly sent to libddwaf.
Loading