test: createZipBomb ignores its compressionRatio parameter

Aperta
#2,090 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Wikid82 ci sta già lavorando.

Dal 28/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

testing

What: createZipBomb(outputPath, compressionRatio = 150) in tests/utils/archive-helpers.ts never uses compressionRatio. It always writes ~10MB of zeros, which gives a ratio of about 1000x whatever the caller passes.

Severity: low (test helper; misleading signature, no product impact).

Evidence: Found while migrating the helpers to node-tar v8. A level-9 archive measured about 1017x regardless of the argument.

Suggested approach: either size the payload from compressionRatio or remove the parameter and update callers.

Note: node-tar v8 readers enforce maxDecompressionRatio (default 1000). Any future test that reads the zip bomb back through listTarGzEntries/readTarGzEntry will throw TAR_ABORT unless it raises that limit.

Lingua principale
Go
Stelle
17
Fork
2
Merge medio
1h 42m
PR unite (30g)
173

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 Wikid82/Charon

Tutte le issue di Wikid82/Charon

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.