cloudflare / cloudflare/developer-platform

🐛 BUG: Unable to put an object with a key containing '...' to R2

Open
#1 6 comments 0 reactions 0 assignees View on GitHub
product:r2
Dominant language
No language data
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Which Cloudflare product(s) does this pertain to?

R2

### What version of `Wrangler` are you using?

3.1.1

### What operating system are you using?

Linux

### Describe the Bug

After I exec `wrangler r2 object put 'blog/assets/_...slug_.abcd1234.css' -f ./dist/assets/_...slug_.abcd1234.css`, it returned `Failed to fetch /accounts/*/r2/buckets/*/objects/assets/_...slug_.abcd1234.css - 403: Forbidden)`.

But when I changed the key into `blog/assets/_.slug_.abcd1234.css`, which has no consecutive '.', it just uploaded without any error.

I think it could be a bug of path handling because the original file (whose key contains three consecutive '.') could be uploaded in the R2 webpage.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported `wrangler r2 object put` command on Linux with Wrangler 3.1.1, comparing the key containing three consecutive periods with the working key. Trace the path handling involved in the R2 upload request. Done means the original key uploads successfully through Wrangler, consistently with the R2 web interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.