Conversation
When the tracer encounters an invalid propagation header value, logging the list of headers and their values can lead to a crash.
bm1549
left a comment
There was a problem hiding this comment.
Can we include some unit tests that fail for the old behavior, but pass for the new behavior?
Anyway, if the issue was due to an exception thrown by the JSON library, then this might help in testing. edit: Ah, I bet it's UTF related. Consider auditing the library for other "for convenience" uses of |
|
@dgoffredo Yes, it's a character encoding / serializing issue.
I was trying to understand what was the purpose, thanks for the context. I will definitely audit for other uses of As always thanks for keeping an eye on |
Description
When the tracer encounters an invalid propagation header value, logging the list of headers and their values is not handled properly.
Details
For each key and value in the list of headers, a
nlohmann::jsoninstance is created with the following code:stream << nlohmann::json(it->first + ": " + it->second);It is possible that an input for any of the headers inspected by the tracer exhibits unexpected behavior when the JSON library attempts to parse or dump the input.