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

Path components weren't being escaped before being used in a Regex. #41

Merged
merged 1 commit into from
Jul 30, 2011

Conversation

justfalter
Copy link
Contributor

I found that normalize_path would throw a RegexpError while trying to handle something like '/path(/..' .. It wasn't escaping components of the path before inserting it into another regex. As a result, any regexy syntax could influence the outcome of the normalization, either by causing an exception or causing the normalization to fail to return what was expected.

If you take a look at my commit, you can see that I've added to the specs to demonstrate both the example I gave before, as well as normalizing something like '/(path)/..' .. I did each of these twice, with and without a trailing '/', in order to ensure that both paths in the regex were followed.

sporkmonger added a commit that referenced this pull request Jul 30, 2011
Path components weren't being escaped before being used in a Regex.
@sporkmonger sporkmonger merged commit 8cea3e9 into sporkmonger:master Jul 30, 2011
@sporkmonger
Copy link
Owner

Good catch. Sloppy mistake on my part.

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.

2 participants