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

SignatureDoesNotMatch error with special characters #952

Closed
3 tasks done
asterikx opened this issue Dec 7, 2020 · 5 comments · Fixed by #969
Closed
3 tasks done

SignatureDoesNotMatch error with special characters #952

asterikx opened this issue Dec 7, 2020 · 5 comments · Fixed by #969
Assignees
Labels
bug This issue is a bug.

Comments

@asterikx
Copy link

asterikx commented Dec 7, 2020

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
I'm generating pre-signed put URLs and hitting SignatureDoesNotMatch errors on special characters.

SignatureDoesNotMatch error:

Object Key:  1/o-2bWeAMR/some-filename_(1).pdf
Request URL: https://bucket-name.eu-central-1.amazonaws.com/1/o-2bWeAMR/some-filename_%281%29.pdf?...

No error:

Object Key:  1/o-2bWeAMR/some-filename.pdf
Request URL: https://bucket-name.eu-central-1.amazonaws.com/1/o-2bWeAMR/some-filename.pdf?...

So ( and/or ) seems to cause the error in this example.

EDIT: Spaces and Umlauts also lead to this error.

Version of AWS SDK for Go?
v0.30.0

Version of Go (go version)?
1.15

To Reproduce (observed behavior)

req, err := c.PresignPutObject(
  ctx,
  &s3.PutObjectInput{
    Bucket: aws.String("bucket-name"),
    Key:    aws.String("1/o-2bWeAMR/some-filename_(1).pdf"),
  },
  s3.WithPresignExpires(in.ExpiresIn),
)

Expected behavior
Pre-sign client handles special characters correctly (as aws-sdk-go v1 did)

@asterikx asterikx added the bug This issue is a bug. label Dec 7, 2020
@jasdel jasdel added this to the v1.0 Release Candidate milestone Dec 7, 2020
@asterikx
Copy link
Author

asterikx commented Dec 8, 2020

@jasdel can we fix this somehow for the time being? If you can give me some pointers to what needs to be done, I'm willing to contribute.

@jasdel
Copy link
Contributor

jasdel commented Dec 10, 2020

HI @asterikx I'm investigating this issue, but don't have a solid workaround for this issue yet. It looks like logging for presigned SDK computed signature isn't working. Ive created #958 to track request signing not working. We'll most likely need to resolve why presign logging isn't working with PresignClient in order to resolve the issue the request signature.

@jasdel
Copy link
Contributor

jasdel commented Dec 10, 2020

Looks like PR #955 will fix the issue with unable to log request signing for presigned URLs. So we can use that to investigate this issue further.

@jasdel
Copy link
Contributor

jasdel commented Dec 12, 2020

I think we've resolved the issue in #969, and unfortunately there is no good way to workaround this issue other than to pull in the PR. Once this PR is approved and merged it will be included in the next tagged release.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants