Skip to content

validate zip unix permissions at file creation#1014

Open
valoq wants to merge 2 commits into
ouch-org:mainfrom
valoq:validation
Open

validate zip unix permissions at file creation#1014
valoq wants to merge 2 commits into
ouch-org:mainfrom
valoq:validation

Conversation

@valoq

@valoq valoq commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator
  • Move the zip mode check into one helper used at both file creation and chmod
  • A mode without unix file-type bits is treated as invalid and falls back to 0o644
  • Fixes a gap left by fix: ignore invalid unix permissions and setuid bits from zip #1007, where file creation still applied the bogus mode
  • Drop the redundant 0o777 mask already done by sanitize_archive_mode
  • Add a test for a mode with no file-type bits falling back to the default
  • Add a test confirming setuid, setgid, and sticky bits are stripped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant