File backend accepts weak If-Match validators as strong matches
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start in the FileBackend ETag matcher, the single helper that strips W/ for both If-Match and If-None-Match, and trace the public object GET route that calls it. Reproduce with a file-backend upload, then GET with If-Match: W/"abc", with and without a Range header; the expected result is 412. Done means If-Match uses strong comparison, If-None-Match stays weak, list and wildcard handling still work, and the copy-source precondition path is checked too.
Written by the indexing model from the issue text.
Description
File-backed object downloads accept a weak If-Match validator when its opaque value equals the stored ETag. A public GET returns 200, or 206 with a Range header, instead of 412 Precondition Failed.
Reproduction
- Use
STORAGE_BACKEND=fileand upload an object. - GET its public object URL and read the response ETag, for example
"abc". - Repeat the GET with
If-Match: W/"abc". - Repeat with both that header and
Range: bytes=0-6.
On current master 9d15cdc9, the public-route reproduction returns 200 and 206. A control with If-None-Match: W/"abc" returns the expected 304.
RFC 9110 section 13.1.1 requires strong comparison for If-Match. Section 13.1.2 requires weak comparison for If-None-Match.
FileBackend uses one matcher that strips W/ for both conditions. The same helper evaluates copy-source preconditions. It needs to distinguish strong matching from weak matching while retaining list and wildcard support.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 318
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 101
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/storage
-
The sample application in storage article points to wrong URLMay be free again @prasadf18 claimed this 207 days ago, and no pull request is open. Opendocumentation
Difficulty 1/5 Under an hour Newbie friendliness 62/100
supabase/storage#557 · 1 comment ·
Maintainers usually reply within 1 day
-
S3 UploadPartCopy failures leak reserved upload sizePossibly taken @hsusul claimed this 1 day ago. Open
Difficulty 3/5 Half a day Newbie friendliness 42/100
Maintainers usually reply within 1 day
-
Local image transformations fail for filenames containing @Possibly taken @hsusul claimed this 2 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
S3 POST uploads reject keys that use the ${filename} variablePossibly taken @hsusul claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
S3 PutObject and CompleteMultipartUpload ignore If-None-MatchPossibly taken @vignesh-chaturvedi claimed this 4 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
All issues in supabase/storage
Similar issues
-
area: frontend priority: normal
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
formbricks/formbricks#9918 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
thecodacus/pithagoras#364 ·
Maintainers usually reply within 1 day
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleOpentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nightgauge/nightgauge#2909 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day