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

Always get 403 SignatureDoesNotMatch error after resuming #481

Open
mehranrezaei opened this issue Jun 8, 2022 · 4 comments
Open

Always get 403 SignatureDoesNotMatch error after resuming #481

mehranrezaei opened this issue Jun 8, 2022 · 4 comments

Comments

@mehranrezaei
Copy link

I use this library in full compliance with official documentation and examples.
My server side program works properly for signing v4, and the upload is done properly.
But I have a problem with the pause and resume functions.
When I pause an upload, after resuming it, the first PUT request always gets a 403 (SignatureDoesNotMatch) error.
After a bit more research, it seems that the reason is that the library sends the wrong stringToSign to the server for signing on the first attempt after the resume.

This is last str_to_sign before pausing

AWS4-HMAC-SHA256 
_20220608T114339Z_ 
20220608/default/s3/aws4_request 
**b45c4ca1a7c7744ea2f3b6507bd3452317773cf30b860f4d98de662b8f7a85b6**

This is the first str_to_sign after resuming

AWS4-HMAC-SHA256
_20220608T114345Z_
20220608/default/s3/aws4_request
**b45c4ca1a7c7744ea2f3b6507bd3452317773cf30b860f4d98de662b8f7a85b6**

As you can see above the time has been changed but the canonicalRequest values are the same.

@mehranrezaei
Copy link
Author

@bikeath1337 @jakubzitny
Please help!

@armanforghani
Copy link

The line 1815 of evaporate.js should be deleted.
if (typeof this._cr !== 'undefined') { return this._cr; }

@mehranrezaei
Copy link
Author

@armanforghani Thanks a lot. By removing that line my problem has been resolved.

@armanforghani
Copy link

You can create a PR to fix this issue.

@mehranrezaei mehranrezaei reopened this Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants