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

Add input validation to getRuleInfo to prevent panic #14501

Merged
merged 2 commits into from Mar 24, 2022
Merged

Conversation

ccapurso
Copy link
Contributor

A panic can be caused if input to the ParsePolicy function contains a field whose value is an empty slice. This is due to a lack of length check in the underlying getRuleInfo function which assumes the parsed slice to contain at least one value. The panic can be prevented by returning an error from getRuleInfo if an empty slice is encountered.

@vercel vercel bot temporarily deployed to Preview – vault March 15, 2022 16:07 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook March 15, 2022 16:07 Inactive
@ccapurso ccapurso requested a review from a team March 15, 2022 16:07
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