This repository was archived by the owner on Jul 31, 2025. It is now read-only.
Update V4 signer to sign Sha256 header for S3 requests#746
Merged
jasdel merged 4 commits intoaws:masterfrom Jul 5, 2016
Merged
Update V4 signer to sign Sha256 header for S3 requests#746jasdel merged 4 commits intoaws:masterfrom
jasdel merged 4 commits intoaws:masterfrom
Conversation
|
|
||
| signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.Body, name, region, req.ExpireTime, signingTime) | ||
| req.SignedHeaderVals = signedHeaders | ||
| req.LastSignedAt = curTimeFn() |
Contributor
There was a problem hiding this comment.
Should we only set this if err was nil?
Contributor
Author
There was a problem hiding this comment.
thanks, updated to only set if there was no signing error.
Adds a LastSignedAt field to the Request type to record when the request was last signed. This fixes a bug where the signer would continue to resign a request every call after the original signature expired.
The X-Amz-Content-Sha256 header was not being signed for S3 requests. This header is required to be signed, per the S3 V4 signature spec. Fix aws#743
ba3d0af to
bae4e52
Compare
Contributor
|
🚢 |
skotambkar
pushed a commit
to skotambkar/aws-sdk-go
that referenced
this pull request
May 20, 2021
stale issue clean up action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The X-Amz-Content-Sha256 header was not being signed for S3 requests.
This header is required to be signed, per the S3 V4 signature spec.
Fix #743