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

Update with master #1

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Update with master #1

wants to merge 12 commits into from

Conversation

juankiz
Copy link

@juankiz juankiz commented May 21, 2024

No description provided.

tenderlove and others added 12 commits August 7, 2019 13:52
This commit fixes the pathological backtracking in the regexp so that we
don't need the RE2 gem anymore.

The problem was the `(\w+\s*){1,3}` part.  Since we accept 0 or more
spaces, and 1 to 3 times, the regex engine would keep backtracking to
figure out if it should do 1, 2, or 3 matches.  We know we want at
least one match, and it *must* be followed by one or more spaces.  If we
remove the space before the "y", we can eliminate the backtracking by
making at least one space required (as the original regular expression
indicated)
Fix pathological backtracking in signature regexp
Signed-off-by: Zack Koppert <zkoppert@github.com>
Add timeout to prevent infinite run
Signed-off-by: Zack Koppert <zkoppert@github.com>
Update tests to address code scanning issues
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.

4 participants