Files
4f1f6d7774 fix(packages): bound decompression of uploaded package archives (#40169)
Package registries walk an uploaded archive to find its metadata,
decompressing every entry on the way with no limit, so a small crafted
archive can burn minutes of CPU. Bound the bytes read while locating
metadata to `max(512 MiB, MAX_DECOMPRESSION_RATIO × upload)`.

The ratio (default 200) scales with the upload so large regular packages
still pass, and `-1` disables the bound. The `.tar.gz` parsers open
uploads through one shared reader that applies it. Parsers already
bounded (npm, debian, helm) are left unchanged.

Docs: https://gitea.com/gitea/docs/pulls/647

Assisted-by: Claude Code:claude-opus-4-8

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: bircni <bircni@icloud.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-11-27 05:16:24 +00:00
..
…
2026-10-24 13:48:19 +00:00