Skip to content

Fix CloudFront signer wildcard question mark handling#3710

Open
rohan-patnaik wants to merge 1 commit into
boto:developfrom
rohan-patnaik:fix-cloudfront-wildcard-question-mark
Open

Fix CloudFront signer wildcard question mark handling#3710
rohan-patnaik wants to merge 1 commit into
boto:developfrom
rohan-patnaik:fix-cloudfront-wildcard-question-mark

Conversation

@rohan-patnaik

@rohan-patnaik rohan-patnaik commented May 22, 2026

Copy link
Copy Markdown

Fixes #3377

Summary

This fixes CloudFront signed URL generation for resource URLs that use ? as a CloudFront wildcard instead of a query-string separator.

Why

Before this change, _build_url() checked only whether ? existed anywhere in the URL. A resource like http://test.com/example_202?.zip was treated as if it already had query parameters, so signing parameters were appended with & and produced an invalid URL.

Test plan

  • .venv/bin/python -m pytest tests/unit/test_signers.py::TestCloudfrontSigner
  • .venv/bin/python -m black --check botocore/signers.py tests/unit/test_signers.py

@rohan-patnaik rohan-patnaik marked this pull request as ready for review May 22, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CloudFrontSigner doesn't account for wildcard question marks

1 participant