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