You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* zip checkpoint
* fix(zip-uploads): harden extract path from review findings
- Replace the whole-buffer central-directory signature scan with an
EOCD-anchored walk (shared with zip-guard) so zips containing STORED
nested archives are no longer falsely rejected, and report the accurate
cap (new 'central_dir_too_large' reason) instead of 'Maximum is 1000'
- Make extraction all-or-nothing: a discarding validation pass inflates
every entry against the caps before anything is uploaded, so lying
headers or corrupt entries can't leave partial trees (corrupt DEFLATE
streams now surface as ArchiveError instead of raw zlib errors)
- Single-source ArchiveError messages; callers surface err.message and
map only status/reason (removes the three divergent message maps)
- Guard save/import against archives (saving stranded the contents),
extend the workspace ownership check to all three operations, dedupe
fileNames, and refuse re-extracting into a non-empty folder instead of
duplicating the tree with ' (1)' copies
- Harden the extraction folder name (dot segments, control chars,
separators) and compute the destination before extracting
- Sniff small '.zip'-named uploads so mislabeled text files stay
readable instead of dead-ending between read and extract
- Scope zip acceptance to the mothership flow only (attachment list,
accept attribute, upload/presigned gates) so execution/workspace/chat
surfaces keep rejecting zips up front
- Don't count skipped noise entries toward the 1000-file cap; restore
per-entry zip-slip forensics via skippedUnsafePaths logging
- Teach materialize_file(fileNames: [...]) in the extract guidance to
match the declared schema
* fix(zip-uploads): address review follow-ups on the extract path
- Roll back already-uploaded files when an upload fails mid-extraction
(storage/DB error, quota crossed), so callers and retries never observe
a partial tree
- Fold reserved system folder names (.changelogs, .plans) into the
'archive' fallback so extraction can't write into alias-backing
namespaces or bypass the already-extracted lookup that hides them
- Align the archive byte-sniff budget with the read path's inline text
cap (5MB), so any mislabeled '.zip' small enough to be read inline is
sniffed and read instead of dead-ending
* fix(zip-uploads): detect prior nested-only extractions in the re-extract guard
The already-extracted check only looked for files directly inside the
archive root folder, so a zip whose entries are all nested (src/index.ts)
left only subfolders there and a second extract slipped past the guard,
duplicating the tree with ' (1)' suffixes. Extraction roots its whole tree
at that folder, so a prior run always leaves a direct file OR a direct
subfolder — check both.
0 commit comments