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
fix(sql-utils): reject blank and non-integer rowids in validateRowId
validateRowId only did Number()+isFinite, so '' / ' ' coerced to 0 and
'123.45' / '1e3' were accepted — silently turning malformed input into
plausible-but-wrong rowids on WHERE rowid = ? paths. Now require a canonical
integer string form and Number.isSafeInteger (rejects blank/whitespace,
fractional, scientific-notation, NaN/Infinity, and >2^53 magnitudes).
Also addresses two test-quality findings from the post-batch Codex review:
- workerFactory_browser.test.ts: drop stale 'name' arg from the local
FakeEndpoint.exportDatabase signature (leftover from #452's arity change)
- databaseModel.test.ts: replace the tautological serializeDatabase assertion
(asserted a value it set itself) with call-count + zero-arity checks
Tests flipped to assert rejection for blank/whitespace/fractional/scientific
rowids. tsc -p tsconfig.json clean; 428 unit tests pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments