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
{{ message }}
Repository navigation
Commit 4ca8972
Browse filesBrowse the repository at this point in the historyBrowse files
fix(install): make bundleSha256 mandatory in schema-1 install records (#655)
* fix(install): make bundleSha256 mandatory in schema-1 install records
A hashing failure at install time used to produce a schema-1 record without
bundleSha256, and every verifier treated a digest-less record as "nothing to
verify" — so switchVersion activated that version unverified.
Now, on iOS, Android and Harmony alike:
- the writer fails the install (PATCH_FAILED, staging dropped, no record)
when the bundle digest is empty or cannot be computed;
- activation rejects a non-empty record whose bundleSha256 is missing,
empty or not a string, via the existing "completion record mismatch"
SWITCH_VERSION_FAILED path;
- the legacy EMPTY marker (SDK < 10.53) stays trusted.
install_record.h documents the digest as mandatory for schema 1.
Tests: Android InstallRecordTest, Harmony hypium InstallRecord.test.ets, a
bun test that evaluates the real Harmony InstallRecord.ts in a vm, and the
iOS purge-restore harness now extracts PushyVerifyInstallForActivation with
a negative-control mutant that re-trusts digest-less records.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(switch): verify recorded current/last versions instead of grandfathering them
switchVersion skipped install-record verification whenever the target was
current_version or last_version, so a digest-less schema-1 record could
still be activated through that path. The grandfathering now applies only
to directories with NO record file (activated before markers existed); a
present record is verified like any other, and the empty legacy marker
stays trusted. iOS applies the same predicate in the state-lock recheck.
The iOS purge-restore harness now extracts the production
switchVersion:error: and covers it (switch_version_records), with a
grandfather-recorded negative-control mutant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments