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

parseKeyPairsIntoRecord does not parse if value conatains equals #3974

Closed
krosenk729 opened this issue Jul 7, 2023 · 2 comments · Fixed by #3975
Closed

parseKeyPairsIntoRecord does not parse if value conatains equals #3974

krosenk729 opened this issue Jul 7, 2023 · 2 comments · Fixed by #3975
Assignees
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect

Comments

@krosenk729
Copy link
Contributor

What happened?

Steps to Reproduce

var exampleValidBaggage = `key=aGVsbG8gd29ybGQhOiE6IQ==`;
var res = parseKeyPairsIntoRecord(exampleValidBaggage)
// res will not have the parsed key as expected

Expected Result

the above example should parse the value to
{ key: 'aGVsbG8gd29ybGQhOiE6IQ==' }

Actual Result

the above example is returning {}

Additional Details

according to https://github.com/w3c/baggage/blob/main/baggage/HTTP_HEADER_FORMAT.md, value MAY contain any number of the equal sign (=) characters. Parsers MUST NOT assume that the equal sign is only used to separate key and value.

however, parseKeyPairsIntoRecord is assuming the equal sign is only a key separator

OpenTelemetry Setup Code

No response

package.json

No response

Relevant log output

No response

@krosenk729 krosenk729 added bug Something isn't working triage labels Jul 7, 2023
@pichlermarc pichlermarc added priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect and removed triage labels Jul 10, 2023
@pichlermarc
Copy link
Member

pichlermarc commented Jul 10, 2023

Hi, thanks for reaching out.
This does indeed look like a bug. I see that you already proposed a fix. Would you mind if I assign this issue to you?

@krosenk729
Copy link
Contributor Author

@pichlermarc yes please assign it to me! thanks

pichlermarc added a commit that referenced this issue Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants