Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semicolons not allowed in 'origin' #2461

Merged
merged 1 commit into from
Dec 5, 2022
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 lib/datadog/tracing/distributed/trace_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ def split_tracestate(tracestate)
private_constant :TRACESTATE_VALUE_SIZE_LIMIT

# Replace all characters with `_`, except ASCII characters 0x20-0x7E.
# Additionally, `,` and `=` must also be replaced by `_`.
INVALID_ORIGIN_CHARS = /[\u0000-\u0019,=\u007F-\u{10FFFF}]/.freeze
# Additionally, `,`, ';', and `=` must also be replaced by `_`.
INVALID_ORIGIN_CHARS = /[\u0000-\u0019,;=\u007F-\u{10FFFF}]/.freeze
private_constant :INVALID_ORIGIN_CHARS

# Replace all characters with `_`, except ASCII characters 0x21-0x7E.
Expand Down
1 change: 1 addition & 0 deletions spec/datadog/tracing/distributed/trace_context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"\u0000", # First unicode character
"\u0019", # Last lower invalid character
',',
';',
'=',
"\u007F", # First upper invalid character
"\u{10FFFF}" # Last unicode character
Expand Down