Skip to content

Fix catastrophic backtracking ReqExp. Closes #336 #337

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

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

imaustink
Copy link
Contributor

It certain input can cause catastrophic backtracking. https://regex101.com/r/MMBcMM/1

@imaustink imaustink requested a review from bgando June 21, 2017 17:06
Copy link

@bgando bgando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this to fix
/<body>[\s\S]+<\/body>/

Copy link

@bgando bgando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Good catch with the .*? to account for props.

@imaustink imaustink merged commit a31f8d0 into master Jun 21, 2017
@imaustink imaustink deleted the 336-fix-runaway-regexp branch June 21, 2017 17:47
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