Skip to content

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Nov 22, 2017

Resolves #1804. All integration tests were run locally and pass.

@codecov-io
Copy link

codecov-io commented Nov 22, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@d6bbbf9). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1808   +/-   ##
=========================================
  Coverage          ?   95.75%           
=========================================
  Files             ?      191           
  Lines             ?     6668           
  Branches          ?     1364           
=========================================
  Hits              ?     6385           
  Misses            ?      283           
  Partials          ?        0
Impacted Files Coverage Δ
lib/signers/presign.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6bbbf9...f1516a2. Read the comment docs.

var parsedUrl = AWS.util.urlParse(request.httpRequest.path);
var queryParams = parsedUrl.search
? AWS.util.queryStringParse(parsedUrl.search.substr(1)) : {};
queryParams['Expires'] = expires;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like queryParams is used after it's created.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove.


AWS.util.each(request.httpRequest.headers, function (key, value) {
if (key === expiresHeader) key = 'Expires';
if (key.indexOf('x-amz-meta-') === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if there are any headers that we hoist to the query string today that don't also have to be sent as headers when using sigv4 presigned urls? Maybe that's just a feature of sigv2, but I'm wondering if we'll lose out on that feature with this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are, and they are all handled here. The current V4 presigner will always produce an invalid signature when any other headers are present.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. So we may want to add additional headers to that section you pointed to in the future, but as of now, this change won't cause any existing cases to break. This part looks good then!

Copy link
Contributor

@chrisradek chrisradek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming travis passes, ship it!

@jeskew jeskew merged commit 929c61c into aws:master Nov 22, 2017
@lock
Copy link

lock bot commented Sep 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 Uploading pre-signed URL with signature v4, Content Disposition causes signature mismatch
3 participants