You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, but panic.
=== 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
Description
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, but panic.
=== 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
Solution in: #5494 👈
Environment
Steps To Reproduce
baggage.NewMemberRaw
with a string (value, or key) including the0x80
rune.baggage.New
with that membervalidateValueChar
in the downstream call stack panics because of an unsafe slice boundary checkExpected behavior
The creation of a baggage member having strings including the
0x80
char fails with an error, instead of panicking.The text was updated successfully, but these errors were encountered: