• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / storage / 43190236934
88%

Build:
DEFAULT BRANCH: master
Ran 12 Nov 2026 09:19AM UTC
Jobs 2
Files 340
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Nov 2026 09:17AM UTC coverage: 87.653% (+0.007%) from 87.646%
43190236934

push

github

web-flow
fix(tus): enforce a zero-byte bucket file size limit (#1668)

## Why

A bucket with `file_size_limit: 0` accepts resumable uploads of any
size. The TUS `maxSize` callback used `||`, so it replaced a 0 limit
with the global limit. `@tus/server` also treats a `maxSize` of 0 as
unlimited, so switching to `??` alone would not fix it. REST and S3
multipart uploads already enforce a 0 limit (#1480).

Fixes #1667.

## What changed

- The `maxSize` callback is now an exported `getTusMaxSize`. Apart from
the two changes below, its logic is the same.
- The bucket limit is resolved with `??`, so `0` is kept and `null`
still falls back to the global limit.
- When the limit is 0, any request that doesn't declare `Upload-Length:
0` gets `ERR_MAX_SIZE_EXCEEDED` (413). Empty uploads still work.

## Scope

- Positive and null bucket limits behave as before.
- A tenant or global limit of 0 is now enforced on this path too, as
`getStandardMaxFileSizeLimit` already does for REST uploads.
- A PATCH to an upload created before its bucket's limit was set to 0 is
now rejected with 413.

## Verification

- The new tests in `src/http/routes/tus/index.test.ts` run POSTs through
a real `@tus/server` `Server` using `getTusMaxSize`. They cover:
  - limit 0 with a declared length or a deferred length, expecting 413
  - limit 0 with `Upload-Length: 0`, expecting 201
  - limit 10 with lengths 10 and 11, and a null limit
- Without the fix, the two zero-limit rejection cases failed with
`expected { statusCode: 201, created: true } to deeply equal {
statusCode: 413, created: false }`. They also failed with only the `||`
to `??` change. With the fix, all 6 pass.
- `npm run test:unit` passed 3,601 tests in 186 files. `npm run lint`
and `tsc -noEmit` passed.
- Local runs used Node 24.9.0, installed with `--engine-strict=false`,
because `package.json` requires Node 26 and this machine doesn't have
it. Integration and acceptance tests were not run.

---------

Signed-off-by: Ferhat Elmas <el... (continued)

8512 of 10214 branches covered (83.34%)

Branch coverage included in aggregate %.

11 of 12 new or added lines in 1 file covered. (91.67%)

14547 of 16093 relevant lines covered (90.39%)

1359.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.41
1.06% src/http/routes/tus/index.ts
Jobs
ID Job ID Ran Files Coverage
1 rest-pg18 - 43190236934.1 12 Nov 2026 09:22AM UTC 318
67.1
GitHub Action Run
2 unit - 43190236934.2 12 Nov 2026 09:19AM UTC 333
70.31
GitHub Action Run
Source Files on build 43190236934
  • Tree
  • List 340
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43190236934
  • 74fe874b on github
  • Prev Build on master (#42920208702)
  • Next Build on master (#43197872124)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc