browsertrix icon indicating copy to clipboard operation
browsertrix copied to clipboard

[Bug]: Incorrectly using Signature v2 API for generating presigned URLs in Backblaze B2

Open reonokiy opened this issue 9 months ago • 0 comments

Browsertrix Version

v1.14.3-9466e83

What did you expect to happen? What happened instead?

The presigned get url to access Backblaze B2 seems use Signature v2 API rather than v4, leading to the access error.

Similar issues (1 2) can be found during my search, it seems that we just need to add a specific version signature_version='s3v4' here:

https://github.com/webrecorder/browsertrix/blob/d8365c734ff6bdb0edc0e248164eec0cbc577cd8/backend/btrixcloud/storages.py#L298

Reproduction instructions

  1. crawl a website
  2. try to open the saved WACZ file
  3. redirect to https://s3.eu-central-003.backblazeb2.com/bucketname/731fds5ds63-ffdssc-4bd4-89b0-f43f77ds9fs8/2025055234354382-f153420-e54-0.wacz?AWSAccessKeyId=05435431345a54300002e&Signature=o154343543oZ%2F3543753jY0%3D&Expires=1742109825 (edited) and have
<Error>
<Code>UnauthorizedAccess</Code>
<Message>bucket is not authorized: bucketname</Message>
</Error>

Screenshots / Video

No response

Environment

No response

Additional details

No response

reonokiy avatar Mar 09 '25 08:03 reonokiy