[Feature] Archive upload preview, selective unpacking, formats, and password support #33

Closed
opened 2026-07-14 20:08:43 +02:00 by zemion · 2 comments
Owner

Problem / User Need

Archive uploads need a richer flow. The system should support more formats than ZIP, password-protected archives, and preview/selective unpacking before files are committed into the target folder.

Acceptance Criteria

  • Archive upload supports common formats such as tar, tar.gz, and related formats where safe.
  • Password-protected archives can be uploaded with a password supplied through the UI.
  • Archive contents are shown before unpacking into the target folder.
  • Users can select which files/folders from the archive to import.
  • The same preview/confirmation model is considered for bulk upload and single upload when it prevents accidental writes.
  • Unsafe paths, oversized entries, and extraction failures are reported before or during confirmation.

Notes / Decisions

Needs safety decisions: supported formats, archive bomb limits, password handling, temporary storage, and whether preview creates a transient server-side unpack plan.

## Problem / User Need Archive uploads need a richer flow. The system should support more formats than ZIP, password-protected archives, and preview/selective unpacking before files are committed into the target folder. ## Acceptance Criteria - Archive upload supports common formats such as tar, tar.gz, and related formats where safe. - Password-protected archives can be uploaded with a password supplied through the UI. - Archive contents are shown before unpacking into the target folder. - Users can select which files/folders from the archive to import. - The same preview/confirmation model is considered for bulk upload and single upload when it prevents accidental writes. - Unsafe paths, oversized entries, and extraction failures are reported before or during confirmation. ## Notes / Decisions Needs safety decisions: supported formats, archive bomb limits, password handling, temporary storage, and whether preview creates a transient server-side unpack plan.
zemion added the area/apicodex/readymodule/files
priority
p2
status
ready
type
feature
labels 2026-07-29 14:15:04 +02:00
Author
Owner

Codex State: ready

Summary

  • Product defaults confirmed: support ZIP, TAR, TAR.GZ, TAR.BZ2, and TAR.XZ.
  • Apply bounded extraction defaults of 10,000 entries, 2 GiB expanded size, and a 100:1 expansion ratio.
  • Keep archive passwords request-memory only and expire preview state after 30 minutes.

Suggested status label: status/ready

## Codex State: ready ### Summary - Product defaults confirmed: support ZIP, TAR, TAR.GZ, TAR.BZ2, and TAR.XZ. - Apply bounded extraction defaults of 10,000 entries, 2 GiB expanded size, and a 100:1 expansion ratio. - Keep archive passwords request-memory only and expire preview state after 30 minutes. Suggested status label: `status/ready`
Author
Owner

Codex State: done

Summary

  • Implemented two-phase archive preview and confirmation for ZIP, TAR, TAR.GZ, TAR.BZ2, and TAR.XZ.
  • Added selective file/folder import, AES/legacy encrypted ZIP password handling, and 30-minute actor/archive/destination-bound preview tokens without server-side password or archive retention.
  • Enforced traversal/special-entry rejection, 10,000-entry, 2 GiB expanded-data, 100:1 expansion-ratio, request-size, and per-file limits during preview and confirmation.

Changed Files

  • src/govoplan_files/backend/storage/archives.py
  • src/govoplan_files/backend/routes/uploads.py
  • webui/src/features/files/FilesPage.tsx

Verification

  • 91 Files tests passed; Ruff and diff checks passed
  • linked Core WebUI production build and bundle budgets passed

Next / Blocked

  • Changes are complete locally and will become available with the next coordinated push/release.
## Codex State: done ### Summary - Implemented two-phase archive preview and confirmation for ZIP, TAR, TAR.GZ, TAR.BZ2, and TAR.XZ. - Added selective file/folder import, AES/legacy encrypted ZIP password handling, and 30-minute actor/archive/destination-bound preview tokens without server-side password or archive retention. - Enforced traversal/special-entry rejection, 10,000-entry, 2 GiB expanded-data, 100:1 expansion-ratio, request-size, and per-file limits during preview and confirmation. ### Changed Files - `src/govoplan_files/backend/storage/archives.py` - `src/govoplan_files/backend/routes/uploads.py` - `webui/src/features/files/FilesPage.tsx` ### Verification - `91 Files tests passed; Ruff and diff checks passed` - `linked Core WebUI production build and bundle budgets passed` ### Next / Blocked - Changes are complete locally and will become available with the next coordinated push/release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-files#33