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

regex freezes on input #10

Open
mikelewis opened this issue Apr 28, 2013 · 2 comments
Open

regex freezes on input #10

mikelewis opened this issue Apr 28, 2013 · 2 comments

Comments

@mikelewis
Copy link

The following code hangs forever:

str="http://www.zerochan.net/868902********************************************************************"
PostRank::URI.extract(str)

I'm on Ruby 1.8.7.

@mikelewis
Copy link
Author

I should say that there isn't even a hacky timeout workaround. This locks up all threads, which doesn't let me to timeout(3) { func }

:(

@igrigorik
Copy link
Member

Hmm, interesting. It appears to hang on the regex match. Removing the \* from the valid_path_chars unblocks it, but that's obviously not the right solution: https://github.com/postrank-labs/postrank-uri/blob/master/lib/postrank-uri.rb#L47

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

No branches or pull requests

3 participants
@igrigorik @mikelewis and others