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
parse hangs on some long urls #12
Comments
|
Try editing the |
|
Yes, now with this change You can close this issue when you provide it as an option. |
|
I've removed validation in v3 of URI.js, so this is no longer an issue. |
During penetration tests with Burp Suite we found that our app hangs on some requests.
It turned out that uri-js
parsehangs on some long urls. Here is a simple script to reproduce it:Here is the result on my machine
Notice how the time increases exponentially - about 5x for each new segment.
So with long enough URL
parsejust hangs at 100% CPU.It seems uri-js uses a generated regex which in my case appears to be this:
The text was updated successfully, but these errors were encountered: