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 regex denial-of-service #27

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

Conversation

mojotx
Copy link

@mojotx mojotx commented Feb 11, 2024

This should fix #24. Need to bump version from v1.0.0 to v1.0.1

Otherwise I am going to have to start using my forked version since this shows up as a Dependabot warning now.

See https://github.com/mojotx/git-goclone/security/dependabot/10

This lets us reproduce the issue with the long duration
Check length of URL and limit to 8000 bytes

Also added a unit test to check
Move runTimingTest() into TestRegex, and eliminate unnecessary
variables
@mojotx
Copy link
Author

mojotx commented Feb 13, 2024

This attempts to address GHSA-3f2q-6294-fmq5 and #24. It is an alternative to #25, but with a more generous URL length limit of 8000 instead of 1000. It still completes in 500 µs on my system, for a URL of 8000 characters.

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.

Security issue in regex
1 participant