蒸发js:恢复上传后始终获得403 signaturedoesnotmatch错误

发布于 2025-02-06 03:00:07 字数 667 浏览 4 评论 0原文

我完全符合官方文档和示例。 我的服务器端程序正常用于签名V4,并且多部分上传的上传正确。

但是我对暂停和恢复功能有问题。 当我暂停上传时,恢复后,第一个PUT请求始终会获取403(SignaturedOesnotMatch)错误。

经过更多的研究,看来库将错误的StringTosign发送到服务器上以签名以在简历后的第一次尝试时签名。

这是最后一个str_to_sign在暂停之前,

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

这是恢复后的第一个str_to_sign

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

,因为您可以在上面更改时间,但CanonicalRequest值是相同的。

I use EvaporateJS in full compliance with official documentation and examples.
My server side program works properly for signing v4, and the multipart 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回首观望 2025-02-13 03:00:07

我认为应删除avopate.js的行1815

if(typeof this._cr!=='undefined'){返回this._cr; }

I think the line 1815 of the evaporate.js should be deleted.

if (typeof this._cr !== 'undefined') { return this._cr; }

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文