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

[PLAT-4685] Guard against non-string keys when encoding metadata to JSON #790

Merged
merged 2 commits into from
Sep 4, 2020

Conversation

kstenerud
Copy link
Contributor

Goal

Passing metadata with non-string keys when reporting errors caused the JSON encoder to crash. This PR guards against that condition.

Design

Since only string keys are allowed in JSON, it's easiest to just ignore any metadata keys that aren't strings.

Testing

New unit test

@kattrali kattrali changed the base branch from master to next September 3, 2020 17:09
@kstenerud kstenerud merged commit 0084fa9 into next Sep 4, 2020
@nickdowell nickdowell deleted the json-key-check branch January 12, 2021 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants