Skip to content

Conversation

@hyperair
Copy link

QUOTE_HEADERS_REGEX suffers from catastrophic backtracking as a result of the following patterns:

This script demonstrates the issue with sample input: https://gist.github.com/hyperair/f5e11e2e347253ef36f7d9855c452f8e

This PR solves the first issue by dropping the unnecessary .* from inside the negative lookahead of the first few regees, and solve the second issue by using a tempered greedy token

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.

1 participant