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

Blank params in base URL not preserved in SigV4 Presigned URL #1059

Closed
eukaryote opened this issue Oct 22, 2016 · 1 comment
Closed

Blank params in base URL not preserved in SigV4 Presigned URL #1059

eukaryote opened this issue Oct 22, 2016 · 1 comment

Comments

@eukaryote
Copy link
Contributor

eukaryote commented Oct 22, 2016

Generating a sigv4 presigned URL when the base URL contains a query parameter without a value results in a presigned URL that doesn't contain the parameter at all, because parse_qs strips blank parameters by default.

For example, 'https://s3.amazonaws.com/mybucket/mykey?uploads' is a base URL for creating a multipart upload URL, and the resulting presigned URL that is generated by the following code no longer has an 'uploads' param when SigV4 is used:

s3.generate_presigned_url(
    'create_multipart_upload',
    Params={
        'Bucket': 'mybucket',
        'Key': 'mykey',
    }
)
@eukaryote eukaryote changed the title SigV4 Presigned URLs broken if URL contains blank query params Blank params in base URL not preserved in SigV4 Presigned URL Oct 22, 2016
eukaryote added a commit to eukaryote/botocore that referenced this issue Oct 22, 2016
@JordonPhillips
Copy link
Contributor

Lets' go ahead and move all discussion to the PR

eukaryote added a commit to eukaryote/botocore that referenced this issue Oct 26, 2016
awstools pushed a commit that referenced this issue Nov 29, 2016
* release-1.4.79:
  Bumping version to 1.4.79
  Update S3 SigV2 param whitelist
  Update to latest models
  Update documentation for raw_config_parse
  Properly log skipping environment credentials
  JSON load request data when presigning
  Add support disabling subsection parsing
  changelog entry for #1059
  sigv4 presigned URL should preserve blank values #1059
  unit test showing bug
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

No branches or pull requests

2 participants