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
2 changes: 1 addition & 1 deletion ddtrace/appsec/_iast/_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ def iast_error(msg, default_prefix="iast::"):
stack = inspect.stack()
frame_info = "\n".join("%s %s" % (frame_info.filename, frame_info.lineno) for frame_info in stack[:7])
log.debug("%s%s:\n%s", default_prefix, msg, frame_info)
_set_iast_error_metric(f"{default_prefix}. {msg}")
_set_iast_error_metric(f"{default_prefix}{msg}")
6 changes: 2 additions & 4 deletions ddtrace/appsec/_iast/taint_sinks/header_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,10 @@ class HeaderInjection(VulnerabilityBase):

def _iast_django_response(wrapped, instance, args, kwargs):
try:
from django import VERSION as DJANGO_VERSION

wrapped.__func__(instance, *args, **kwargs)
if DJANGO_VERSION < (3, 2, 0):
if hasattr(instance, "_headers"):
instance._headers = HeaderInjectionDict(instance._headers)
else:
elif hasattr(instance, "_store"):
instance._store = HeaderInjectionDict(instance._store)
except Exception as e:
iast_error(f"propagation::sink_point::Error in _iast_django_response. {e}")
Expand Down
Loading