Skip to content

Commit

Permalink
fix constant
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur committed Jan 22, 2025
1 parent 756e9bb commit ed9d8fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ddtrace/appsec/_iast/_taint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def __init__(self, original_dict, origins=(0, 0), override_pyobject_tainted=Fals

self._obj = original_dict
self._origins = origins
self.ORIGIN_KEY = origins[0] if origins[0] else OriginType.PARAMETER_NAME
self._origin_key = origins[0] if origins[0] else OriginType.PARAMETER_NAME
self._origin_value = origins[1] if origins[1] else OriginType.PARAMETER
self._override_pyobject_tainted = override_pyobject_tainted

Expand Down Expand Up @@ -471,7 +471,7 @@ def items(self):

def keys(self):
for k in self._obj.keys():
yield self._taint(k, k, self.ORIGIN_KEY)
yield self._taint(k, k, self._origin_key)

def pop(self, *args):
return self._taint(self._obj.pop(*args), "pop")
Expand Down
3 changes: 2 additions & 1 deletion ddtrace/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"SAMPLING_AGENT_DECISION",
"SAMPLING_RULE_DECISION",
"SAMPLING_LIMIT_DECISION",
"ORIGIN_KEY" "USER_ID_KEY",
"ORIGIN_KEY",
"USER_ID_KEY",
"HOSTNAME_KEY",
"RUNTIME_FAMILY",
"BASE_SERVICE_KEY",
Expand Down
4 changes: 2 additions & 2 deletions ddtrace/internal/utils/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
from ddtrace.internal.constants import BLOCKED_RESPONSE_JSON
from ddtrace.internal.constants import DEFAULT_TIMEOUT
from ddtrace.internal.constants import SAMPLING_DECISION_TRACE_TAG_KEY
from ddtrace.internal.constants import W3C_TRACESTATE_ORIGIN_KEY
from ddtrace.internal.constants import W3C_TRACESTATE_PARENT_ID_KEY
from ddtrace.internal.constants import W3C_TRACESTATE_SAMPLING_PRIORITY_KEY
from ddtrace.internal.constants import W3C_TRACESTATEORIGIN_KEY
from ddtrace.internal.http import HTTPConnection
from ddtrace.internal.http import HTTPSConnection
from ddtrace.internal.uds import UDSHTTPConnection
Expand Down Expand Up @@ -153,7 +153,7 @@ def w3c_get_dd_list_member(context):
if context.dd_origin:
tags.append(
"{}:{}".format(
W3C_TRACESTATEORIGIN_KEY,
W3C_TRACESTATE_ORIGIN_KEY,
w3c_encode_tag((_W3C_TRACESTATE_INVALID_CHARS_REGEX_VALUE, "_", context.dd_origin)),
)
)
Expand Down

0 comments on commit ed9d8fd

Please sign in to comment.