Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

S3 ListBuckets ignores max-buckets and continuation-token

Aperta
#1,622 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vignesh-chaturvedi ci sta già lavorando.

Dal 28/10/2026.

  • #1623 di @vignesh-chaturvedi — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
postgresql, typescript
Ambito
api, backend, databases

Direzione di ricerca

Start by locating the ListBuckets route and S3ProtocolHandler.listBuckets, the two entry points named in the issue. Trace how the route validates and forwards query parameters, then how bucket results are ordered and paged. Reproduce with the TypeScript example; done means MaxBuckets limits results, later pages return a ContinuationToken, and invalid values receive HTTP 400.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug

S3 ListBuckets ignores the max-buckets and continuation-token query parameters. A request with max-buckets=1 returns every bucket in the project, and the response never includes a ContinuationToken, so paginated clients always get a single page. Out-of-range values such as max-buckets=0 and malformed continuation tokens are accepted with HTTP 200.

AWS documents max-buckets as 1 to 10,000, includes ContinuationToken in the response when more buckets can be listed, and applies a default page size of 10,000 when prefix or continuation-token is sent without max-buckets: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html

Follow-up to #1618, which covered prefix.

Reproduction

Against the local integration stack on current master (dd17e18a):

for (const Bucket of ['repro-page-a', 'repro-page-b', 'repro-page-c']) {
  await client.send(new CreateBucketCommand({ Bucket }))
}

await client.send(new ListBucketsCommand({ MaxBuckets: 1 }))
// returns every bucket in the project (223 locally); ContinuationToken is undefined

for await (const page of paginateListBuckets({ client, pageSize: 2 }, { Prefix: 'repro-page-' })) {
  // a single page: ['repro-page-a', 'repro-page-b', 'repro-page-c']
}

await client.send(new ListBucketsCommand({ MaxBuckets: 0 }))
await client.send(new ListBucketsCommand({ ContinuationToken: 'not-a-token' }))
// both succeed with HTTP 200 and return every bucket

Expected behavior

  • MaxBuckets: 1 returns one bucket and a ContinuationToken.
  • The paginator yields ['repro-page-a', 'repro-page-b'], then ['repro-page-c'].
  • max-buckets outside 1 to 10,000 and invalid continuation tokens are rejected with 400.

Root cause

The ListBuckets route declares and forwards only prefix, so max-buckets and continuation-token are never validated or read. S3ProtocolHandler.listBuckets always lists every matching bucket with no order or limit.

Lingua principale
TypeScript
Stelle
1.3k
Fork
314
Merge medio
2g 1h
PR unite (30g)
97

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di supabase/storage

Tutte le issue di supabase/storage

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.