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

Uppercase host name causes SignatureDoesNotMatch in 2.0.0 #920

Closed
JumpyKitten opened this issue Sep 29, 2017 · 2 comments
Closed

Uppercase host name causes SignatureDoesNotMatch in 2.0.0 #920

JumpyKitten opened this issue Sep 29, 2017 · 2 comments
Assignees

Comments

@JumpyKitten
Copy link

Set this in .s3cfg:
host_bucket = %(bucket)s.s3.AMAZONAWS.com

s3cmd ls s3://somebucket
ERROR: S3 error: 403 (SignatureDoesNotMatch): The request signature we calculated does not match the signature you provided. Check your key and signing method.

This used to work in 1.6.1. It's a new issue in 2.0.0.
It appears 2.0.0 has changed to emit the Host header in lowercase conversion. But the signature was computed with the original hostname without conversion.

@fviard fviard self-assigned this Oct 4, 2017
@fviard fviard closed this as completed in c3cc4e7 Oct 10, 2017
@fviard
Copy link
Contributor

fviard commented Oct 10, 2017

Thank you very much for the detailed report and for having investigated it.
This was a nasty bug.
I have a pushed a fix for it. Don't hesitate to give it a try with the MASTER version if you can.

@JumpyKitten
Copy link
Author

I tested. The fix works. Thanks. I know this is unlikely a problem for out-of-the-box use with Amazon S3. But when used with S3-compatible systems, some people, like me, has a bad habit of using mixed-case hostname, e.g., S3-server-A.acme.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants