Open everlastin opened 9 years ago
What version of Thumbor are you using? Which of the URLs causes the error?
We are using version 4.12.2 and both URLs are failing. Unsafe URLs work without any issues which is good for development, but we want to make use of the secure URLs when we go live. Any thoughts?
I'm not quite sure. Can you confirm that you get a different URL when you use thumbor-url
to generate the URL? E.g.:
thumbor-url --key="<key>" --width=252 --height=198 https://s3.amazonaws.com/bucket-name/rP1ysDPH_Photo_Apr_18_8_46_13_PM.jpg
Same result as the first URL above: /5DlvHS38TZ3OTS2t7qKdKzN6lU4=/252x198/https://s3.amazonaws.com/bucket-name/rP1ysDPH_Photo_Apr_18_8_46_13_PM.jpg
Could it be the version of Thumbor we are using?
Perhaps your production Thumbor server is misconfigured. Is it definitely using the same key you're using to generate these URLs?
Could it be because the last part of your url is not urlencoded ?
How did you guys solve this? Having the same issue right now
@harto That was our case. Probably might be worth mentioning it better in docs
Mm. So we should manually encode the URLs we send to thes library?
If so: why is this not handled by the library? Looks like a bug to me!
At least in newer Thumbor versions, the entire image URL should be urlencoded, since it is used as an URL part itself. This library should handle that.
I think I've fixed this in https://github.com/webfactory/phumbor/pull/1, you could try webfactory/phumbor: ^1.2.3
on Composer.
I can confirm that the fix in webfactory/phumbor: ^1.2.3
solves the issue. @mpdude Can you create a PR for this?
Since this issue here is three years old and as #21 also tries to fix it (in a slightly different way), my assumption was that this project here has been abandoned.
That’s why I forked it (with a heavy heart) and re-published it as webfactory/phumbor.
Why would we receive the malformed url error for the url below:
http://thumbor-server.com/5DlvHS38TZ3OTS2t7qKdKzN6lU4=/252x198/https://s3.amazonaws.com/bucket-name/rP1ysDPH_Photo_Apr_18_8_46_13_PM.jpg
http://thumbor-server.com/oV_9XVqUObpIX_ojRagaC3QnG54=/252x198/https%3A%2F%2Fs3.amazonaws.com%2Fbucket-name%2FrP1ysDPH_Photo_Apr_18_8_46_13_PM.jpg
Any thoughts?