1 Commits (0aa6a6862e7602d41491f413e06a10a8ec087dff)

Author SHA1 Message Date
Elijah Voigt 0aa6a6862e feat(pages): accept gzip/zstd/xz compressed tar uploads
Extend the upload validator to accept .tar.gz/.tgz, .tar.zst, and
.tar.xz archives alongside raw .html and .zip. Upload-kind dispatch is
now magic-byte sniffing (detect_kind) rather than trusting Content-Type,
matching the module's never-trust-the-archive posture.

build_tar_manifest reuses every zip-path structural and size rule
(path-traversal checks, dedup, entry cap, root index.html requirement).
The streaming zip-bomb defense is preserved end-to-end: gzip/zstd decode
lazily as each tar entry is read, and one-shot xz decompresses into a
size-bounded LimitedWriter so a bomb aborts mid-decompress. All decoders
are pure Rust (flate2 rust_backend, ruzstd, lzma-rs) and the tar crate
compiles cleanly for wasm32-unknown-unknown; bzip2 is intentionally out
of scope.

Frontend accept list and Content-Type helper updated; the backend now
sniffs the real format so archives are sent as application/octet-stream.

Beans: pages-w7ow (feature) + pages-r4ob/g39t/wadp/u3zc (tasks).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 days ago