Commit c204938
committed
Reject ';' as a dd tracestate key character
isAllowedKeyChar didn't exclude the element separator, so a key scan starting right after an empty element
(e.g. "dd=s:2;;o:some") would swallow the next ';' into the key instead of failing, silently dropping the
origin tag rather than rejecting the malformed member.
Datadog's sibling codec already excludes its element separator from key chars; align W3C's the same way.
Flagged by Copilot review on PR #12229.1 parent 3c2938b commit c204938
2 files changed
Lines changed: 6 additions & 1 deletion
File tree
- dd-trace-core/src
- main/java/datadog/trace/core/propagation/ptags
- test/java/datadog/trace/core/propagation
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
369 | 372 | | |
370 | 373 | | |
371 | 374 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
0 commit comments