Skip to content

rawurldecode destroys signed URLs #433

@richardhj

Description

@richardhj

Hi, I wonder why Glide is decoding the URL query string here?

return rawurldecode($path);

For example, I use time-based signed URLs in my app (similar to AWS public URLs).

I pass the following URL to Glide:

# Input
https://www.example.org/media/image-67ed4d0a4bc2e.jpg?_hash=x84grayC%2BIEDxbBts9H3G56ZQAPwVgNwJ8HpviGNRfY%3D&t=2025-04-11T21%3A44%3A46%2B00%3A00

Glide ends up with querying the following URL:

# Output
https://www.example.org/media/image-67ed4d0a4bc2e.jpg?_hash=JJWBwceCh9lxMbJkiQhifRPizOn1JTtG/8Gh2JASt0M=&t=2025-04-11T21:43:19+00:00

The latter URL is invalid, because the query changes, that was used to generate the URI signature.

Glide thinks the image is non-existent and fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions