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

Fix catastrophic backtracking with reference RegExp. Fixes issue #9. #10

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

rossj
Copy link
Contributor

@rossj rossj commented Apr 20, 2020

This PR excludes & from the reference regex. I have not checked over any other regexes for any other backtracking issues.

Copy link
Owner

@rgrove rgrove left a comment

Choose a reason for hiding this comment

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

Great catch. Thanks for the fix and the tests! I'll merge this shortly.

Given the way parse-xml constructs regexes, some of them can end up being pretty complex, which could mean there are other potentially pathological cases that are harder to spot than this one. I'll try to find some time to do some investigation around this.

@rgrove rgrove merged commit bdbeaba into rgrove:master Apr 20, 2020
@rgrove rgrove linked an issue Apr 20, 2020 that may be closed by this pull request
@rossj
Copy link
Contributor Author

rossj commented Apr 20, 2020

👍 thanks for the library and the quick merge / publish!

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.

Parsing can hang on attributes with many references
2 participants