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

url parameter is decoded twice, making normalization overly-painful. #10

Open
xxx opened this issue Sep 6, 2012 · 0 comments
Open

url parameter is decoded twice, making normalization overly-painful. #10

xxx opened this issue Sep 6, 2012 · 0 comments

Comments

@xxx
Copy link
Contributor

xxx commented Sep 6, 2012

The url parameter is being decoded an extra time, meaning that normalization of bad urls is not possible in a straightforward way.

The offending second decode is lib/image-magick.js line 202, which causes it to fail on urls like

http://localhost:3000/resize/magic?size=100x100&url=http%3A%2F%2Fthegenericman.com%2Fassets%2Fimg%2Fproduct_images%2Ftgm%2520large%2FGNRCMAN_122211-739.jpg

due to cURL's lack of normalization on its end (see #9).

Using params.url directly instead of decoding it (it's already been decoded at this point) resolves the issue.

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

1 participant