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

[BugFix]: Fix panic occurring for regex with incomplete groupings #429

Merged
merged 2 commits into from Dec 7, 2023

Conversation

joshfried-aws
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:
After running the guard fuzzer we found an issue where Fancy regex does not handle the case where an improper grouping is present in the regex. To fix this we added a check before trying to create the regex, checking if unescaped parenthesis are matched. If they are not matched, we error out.

I have also added tests to ensure the fix is correct.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@joshfried-aws joshfried-aws merged commit f624b46 into aws-cloudformation:main Dec 7, 2023
8 checks passed
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