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

Backport of fix TypeCommaIntSlice panic caused by json.Number input into release/1.10.x #15082

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #15072 to be assessed for backporting due to the inclusion of the label backport/1.10.x.

The below text is copied from the body of the original PR.


Vault will panic when it attempts to parse fields with a schema of TypeCommaIntSlice if the provided value is an integer specifically if provided within the JSON body of an HTTP request. This is similar to a recent fix that was implemented for TypeCommaStringSlice which was fixed in #14522. The issue resides in mapstructure.StringToSliceHookFunc.

The fix provided in this pull request is to check if the raw input is of type json.Number and then calling String().

Fixes #15057

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/fix-TypeCommaIntSlice-json-number-panic/poorly-first-hermit branch from 36010fe to ec4c173 Compare April 18, 2022 20:43
@ccapurso ccapurso merged commit 474e38e into release/1.10.x Apr 18, 2022
@ccapurso ccapurso deleted the backport/fix-TypeCommaIntSlice-json-number-panic/poorly-first-hermit branch April 18, 2022 22:25
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.

None yet

3 participants