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 f435e5b
Browse filesBrowse the repository at this point in the historyBrowse files
SEL-297: TypeScript offline verifier rejects genuine receipts whose signed payload contains floats or large integers (#126)
* SEL-297: TypeScript offline verifier rejects genuine receipts whose signed payload contains floats or large integers
Linear: SEL-297
Refs #95
Engine: muse (fleet coding engine, Grok Bot dispatch)
* SEL-297: fix CI and update with main (retry pass, codex)
* fix: resolve CI and update with main (SEL-297 retry pass, grok)
if(computed!==p.payload_hash)returnfail("mismatch","payload_hash does not match the signed payload",kid);
215
-
}
271
+
// payload_hash is advisory and never recomputed here. The Ed25519 check
272
+
// above already covers signing_input verbatim, payload_hash included, so
273
+
// any edit to the signed bytes is invalid. Re-serializing the parsed
274
+
// payload would reject genuine receipts: JSON numbers do not round-trip
275
+
// across languages (Python signs 1.0 and 4e-05; this parser reads them as
276
+
// 1 and 0.00004). Integers that do not fit in a JS number are returned as
277
+
// the signed decimal text, not the rounded number.
216
278
constreceiptId=p.receipt_id;
217
279
if(typeofreceiptId!=="string"||!receiptId)returnfail("malformed","signed payload has no receipt_id",kid);
218
280
if(b.receipt_id!==undefined&&b.receipt_id!==null&&b.receipt_id!==receiptId)returnfail("mismatch","bundle receipt_id does not match the signed receipt_id",kid,receiptId);
0 commit comments