-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix TypeCommaIntSlice panic caused by json.Number input #15072
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if it is comma separated ints e.g. 1,2
?
@swayne275, that's a great question. Providing If providing |
@ccapurso why do we use |
@swayne275, it allows users to provide |
f5327af
to
8edb1c2
Compare
* fix TypeCommaIntSlice panic caused by json.Number input * add changelog entry
* fix TypeCommaIntSlice panic caused by json.Number input * add changelog entry
* fix TypeCommaIntSlice panic caused by json.Number input * add changelog entry
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 forTypeCommaStringSlice
which was fixed in #14522. The issue resides inmapstructure.StringToSliceHookFunc
.The fix provided in this pull request is to check if the raw input is of type
json.Number
and then callingString()
.Fixes #15057