fix: treat wsPort/relayUrl null same as undefined in manifest validation + normalise (v4.7.9) Root cause layer 3: the v4.7.4 canonical fix strips null from canonical bytes (so Ed25519 signatures match between browser and Android), but the body validation runs on the RAW parsed JSON where wsPort is null. The guard was d.wsPort !== undefined — and null !== undefined is true, so typeof null !== 'number' (typeof null is 'object') throws 'device.wsPort invalid'. Android's Kotlin nullable Int serialises as JSON null when no LAN port is configured. Fix: !== undefined → != null (catches both null and undefined) in both the validation block and normaliseEntry. Same for relayUrl. Regression test: inject wsPort:null into a signed manifest body (simulating the wire), verify it passes validation without throwing. Three layers of the same root cause now fixed: v4.7.4 — canonicaliser skips null fields (signature bytes match) v4.7.8 — validator accepts wsPort:0 (Kotlin Int default) v4.7.9 — validator accepts wsPort:null (Kotlin nullable Int → JSON null) Diag lines from v4.7.7 kept for one more live round. Gates: tsc RC=0, device-manifest 15/15, build clean.
$ koh steal kepr.uk/peach-browser@de56d93b26ce
·
parent: ceeb0d1edf66
discussion
log in to leave a comment.