forked from open-telemetry/opentelemetry-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(baggage): validate chars panic with 0x80 (open-telemetry#5494)
The validation rule for baggage key/values chars has a N+1 problem with the unicode value: `0x80`. For instance, `baggage.NewMemberRaw` could be called with a string value including the rune `128` and return no error. Then `baggage.New` would panic on `validateValueChar`: ``` === RUN TestValidateValueChar --- FAIL: TestValidateValueChar (0.00s) panic: runtime error: index out of range [128] with length 128 [recovered] panic: runtime error: index out of range [128] with length 128 ``` --------- Co-authored-by: Sam Xie <sam@samxie.me>
- Loading branch information
Showing
3 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters