You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem exists in master, in the Downloader code here
What is happening here is that the colons in the query path are being interpreted as scheme delineators, and the Addressable::URI.encode(uri_parts.join('?')) then fails to encode.
This is a regression and was introduced with this change to the Carrierwave::Downloader::Base
Attempting to encode these colons as %3A caracters in the url before this method allows us to pass through without error, however the resulting url is different and not working:
We're experiencing similar issue with double-escaped characters.
Original URL: https://my.image.resize.proxy/resize?height=600&nocrop=false&stripmeta=true&type=auto&url=http%3A%2F%2Fs3.amazonaws.com%2Fuploads%2Frecipe%2Fcover%2F212001%2F5d5abf197eaee26e.jpg&width=800
After process_uri https://my.image.resize.proxy/resize?height=600&nocrop=false&stripmeta=true&type=auto&url=http%253A%252F%252Fs3.amazonaws.com%252Fuploads%252Frecipe%252Fcover%252F212001%252F5d5abf197eaee26e.jpg&width=800
Valid Google Maps URI with colons:
Error when running that URI through
Carrierwave::Downloader::Base#process_uri
:The problem exists in master, in the
Downloader
code hereWhat is happening here is that the colons in the query path are being interpreted as scheme delineators, and the
Addressable::URI.encode(uri_parts.join('?'))
then fails to encode.This is a regression and was introduced with this change to the
Carrierwave::Downloader::Base
Attempting to encode these colons as
%3A
caracters in the url before this method allows us to pass through without error, however the resulting url is different and not working:One potential solution is to not use
Addressable::URI.encode
for the query, but the normalURI.encode
:Another potential solution is to split on
:
chars, then join again after encoding its parts:There may be more solutions.
The text was updated successfully, but these errors were encountered: