Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unquoting of query string reserved characters #60

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

mliarakos
Copy link
Contributor

@mliarakos mliarakos commented Jan 2, 2022

Fixes #59.

In amz_cano_querystring:

  • removed the initial unquote/quote steps to prevent the introduction of quoted reservered characters
  • manually quote semicolons so they aren't interpreted as an alternative delimiter to ampersand by parse_qs (AWS doesn't consider them a delimiter and this was previously handled by the quote step)

This breaks the post-vanilla-query-nonunreserved test in aws_testsuite because responses auto-quotes the URL, so in test_requests_aws4auth.py:

  • undo the URL auto-quoting so that the aws_testsuite URLs are passed in without modification (previously the unquote/quote steps temporarily undid the quoting)

Added test cases to cover this issue. All tests pass. including the live tests (for the endpoints that still exist).

@tedder
Copy link
Owner

tedder commented Mar 24, 2022

sorry for the delay. this is good!

@tedder tedder merged commit 30df596 into tedder:master Mar 24, 2022
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.

Quoted reserved characters are unquoted when creating canonical query string
2 participants