You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[UX] Bucket names aren't validated, PUT auto-creates buckets, and a bucket named "health" can't be listed #164
check_bucket_name rejects only empty names, /, NUL and over-long names, and any object PUT silently creates its bucket. So a typo in a bucket name creates a new bucket, and since there's no ListBuckets or DeleteBucket (#159), you can't see it or remove it. Separately, the /health route shadows any bucket named health.
Classification
Type: UX Friction
Severity: Medium
Verification: Verified (Runtime)
Location:crates/protocol-s3/src/lib.rs:272-321 (auto-create in put_object), :539-549 (check_bucket_name), crates/protocol-s3/src/server.rs:48
Reproduction / Context
PUT /UPPER, PUT /with%20space, PUT /%F0%9F%9A%80, PUT /a..b, PUT /-lead and PUT /x all return 200. S3 requires 3-63 characters of lowercase letters, digits, . and -, starting and ending with a letter or digit, and no ...
PUT /health returns 405, because only GET is routed there. PUT /health/a.txt returns 200 and creates bucket health. After that, GET /health returns {"service":"SPACE S3 Protocol View","status":"healthy"}, so the bucket's listing can never be fetched.
Real S3 answers a PUT into a missing bucket with 404 NoSuchBucket. SDK code written against S3 relies on that, so a typo here goes unnoticed.
Proposed Fix / Recommendation
Enforce S3 bucket naming rules in check_bucket_name and return InvalidBucketName. Existing stores may already hold invalid names, so keep reading those and refuse only new ones.
Return NoSuchBucket for an object PUT into a missing bucket. If auto-create is worth keeping for the curl demo, put it behind --auto-create-buckets and update the banner and the quick start.
Move the health check off the bucket namespace, either under a reserved prefix such as /-/health (bucket names can't start with -) or by reserving health as an invalid bucket name.
Done in 39dfdb3 (#187). A PUT into a missing bucket now returns 404 NoSuchBucket, before the body is stored. New bucket names must follow S3's rules, or the request gets InvalidBucketName. Buckets an older build created keep working. The health check moved to /-/health, so a bucket named health can be listed. I kept no auto create flag: the quick start creates its bucket first. The changelog is updated. This closes when #187 merges.
Activity
saworbit commentedon Nov 13, 2026
Done in 39dfdb3 (#187). A PUT into a missing bucket now returns
404 NoSuchBucket, before the body is stored. New bucket names must follow S3's rules, or the request getsInvalidBucketName. Buckets an older build created keep working. The health check moved to/-/health, so a bucket namedhealthcan be listed. I kept no auto create flag: the quick start creates its bucket first. The changelog is updated. This closes when #187 merges.