Skip to content

fix(proxy): preserve percent-encoded image URLs in proxy link - #13506

Open
ChristophWurst wants to merge 1 commit into
mainfrom
fix/proxy-percent-encoded-image-url
Open

fix(proxy): preserve percent-encoded image URLs in proxy link#13506
ChristophWurst wants to merge 1 commit into
mainfrom
fix/proxy-percent-encoded-image-url

Conversation

@ChristophWurst

Copy link
Copy Markdown
Member

linkToRoute() routes the src through Symfony's UrlGenerator, whose QUERY_FRAGMENT_DECODED map rewrites %252F back to %2F. That single character diverged from the value the HMAC was signed over, so the proxy rejected signed CDN image URLs with HTTP 401. Append src to the query with our own single encoding so it round-trips intact.

Assisted-by: Claude:claude-opus-4-8

Fixes #13493

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

linkToRoute() routes the src through Symfony's UrlGenerator, whose
QUERY_FRAGMENT_DECODED map rewrites %252F back to %2F. That single
character diverged from the value the HMAC was signed over, so the
proxy rejected signed CDN image URLs with HTTP 401. Append src to the
query with our own single encoding so it round-trips intact.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image proxy returns 401 (HMAC mismatch) for remote images whose URL query contains percent-encoded characters

1 participant