-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The protected method buildUrl does two things:
- Replace already encoded slashes (
%2F) with/. - Replace unencoded whitespace (
) with%20.
While step two is correct to "fix" the URL, step one is not. There is a good case to have encoded slashes (%2F) in the URL.
For example the image resizing server thumbor uses the following format for the URLs: https://thumbor-server/fit-in/100x100/path%2Fto%2Fimage.png (Format: SERVER/COMMANDS/ENCODED_IMAGE_SOURCE_PATH).
Replacing the valid %2F will result in https://thumbor-server/fit-in/100x100/path/to/image.png and makes the URL invalid for thumbor. There might be other cases as well where this is explicitly not expected.
So I'd suggest to remove this replacement completely, or make it configurable.
Metadata
Metadata
Assignees
Labels
No labels