-
Notifications
You must be signed in to change notification settings - Fork 3k
URL Path is Decoded Twice, leading to errors or worse if the escape character % is present in the decoded string #278
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
Comments
@dkang81, would you be interested in submitting a pull request with passing tests? If you had time to fix the issues, we could def use the help! Otherwise we can look into it when we get a chance. |
@dkang81 Or, if you could just submit a patch with a failing test that demonstrates the issue, I can patch it. Thanks. |
@timkindberg @nateabele wow, thanks for quick responses guys, I do have unit tests and a fix for this now, just need to ask my boss for permission, should be able to submit a pull request sometime tomorrow! |
Awesome, thanks man. |
I think the fix is good as it stands now, however something to think about is if urlMatcher shouldn't really be looking at non-decoded URLs (and we should have some way to get that from $location). If I have a state 'test' with a URL pattern like '/foo/:whatever/bar', it should round-trip correctly even if I transitionTo('test', { whatever: 'evil/slash' }). Or am I missing something? |
Also, I don't know if this is compensating for the other bug, but in UrlMatcher.prototype.format, encodeURIComponent is missing for the path part of the URL - should be result += encodeURIComponent(value).
The text was updated successfully, but these errors were encountered: