Skip to content

fix(cli): Preserve file permissions in IPA uploads - #2461

Open
lcian wants to merge 3 commits into
mainfrom
lcian/fix/preserve-ipa-executables
Open

lcian wants to merge 3 commits into
mainfrom
lcian/fix/preserve-ipa-executables

Conversation

@lcian

@lcian lcian commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Uploading an IPA drops the Unix permissions on its app and framework binaries. This change carries each file's type and permission bits from the IPA into the XCArchive sent to Build Distribution.

The CLI now reads the attributes from the central directory and continues to stream the file contents through temporary files. An IPA with more than 65,535 entries did not upload before this change and still does not, but now fails with a validation error instead of a raw RangeError.

The server-side fix preserves those bits when generating the installable IPA. getsentry/launchpad#756

Co-Authored-By: Codex CLI Agent <noreply@openai.com>
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 21, 2026 8:12pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 21, 2026 8:12pm UTC

Request Review

Reading an IPA through its central directory trusted whatever the archive declared. A macOS ditto or Archive Utility archive over 65,535 entries declares a wrapped count, so only part of the app was staged without any error. Compare the directory size read with the declared one and fail before extracting anything.

Also check each entry's CRC-32 with the helper the dSYM extraction now shares, report parser failures as validation errors, decode unflagged names as UTF-8 when they are valid UTF-8, keep names that contain a backslash, and forward only the regular-file or symlink type and rwx bits of a Unix entry.
Decoding unflagged names as UTF-8 and checking entry CRC-32s address problems that already exist on main and are unrelated to preserving permissions, so they leave this change. The dSYM extraction and the CRC module are back to their original content. Also shorten the JSDoc added with the IPA staging.
@vercel
vercel Bot temporarily deployed to Preview – sentry-local November 21, 2026 20:12 Inactive
@lcian
lcian marked this pull request as ready for review November 21, 2026 20:13
@lcian
lcian requested a review from a team November 21, 2026 20:13
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 21, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 1fe60f63 Deployed Nov 21, 2026 by vercel[bot]
Preview – sentry-local — 1fe60f63 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant