-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
URL-decode subresource values as well as other query parameters #530
Conversation
c2aeff5
to
2930831
Compare
Pushed the commit that includes fixing wrong test. |
Access denied case with
As a comparison, with normal (not URL-encoded)
|
@shino Can you provide a reproduction test case with a failing request? |
@AdityaManohar I wrote simple sample code [1] using List Parts API [2]. Command line usage:
Now only signature is related, we can use any bucket, key and uploadId.
If uploadId is url-unsafe, then original code returns error
This PR fixes this case and get error [1] https://gist.github.com/shino/602caae62725a82c559c |
I forgot to add region argument, so I added it to the above comment. |
@shino |
Ping. If there is any subtle points or inconvenience for merge, please ping back me 😄 |
Ping. How's going? |
I've spent three days to hunt this bug. @AdityaManohar It's been !!two years!! from this pull request and !!4 lines of code!! Do you ever want to merge it or do I have to publish a merged version, that is actually working with v2 signatures? Thank you. |
@orinciog Could you describe your case? |
@shino Yes, my case is identical with basho/riak_cs#1327 The problem is that when computing the signature for uploadPart, the value of uploadId is not url-encoded. |
Closing out this issue. We appreciate the contribution, but due to the age, feel it does not need to be merged at this time. |
The issue is still valid for the current version of aws-sdk-js (2.392.0). I had to fork your lib in order to make v2 signatures work. |
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. |
In signing request to S3, current implementation does not URL-decode subresource values in query parameters. Other query parameters are properly URL-decoded in creating canonicalResource.
For example, another client implementation, s3curl, perform URL-decode for subresource values [1].
[1] https://github.com/rtdp/s3curl/blob/master/s3curl.pl#L192-L199