Severity: P2 · Batch: B11 (input validation)
Location
src/utils/props.js:11-17 + src/utils/type-guards.js:33
Failure scenario
card-id="007" → 7, "1e3" → 1000, "0x10" → 16, " 42 " → 42 — zip codes, IDs, versions silently corrupted with no opt-out.
Proposed fix
Restrict numeric coercion to /^-?\d+(\.\d+)?$/; document; optionally support a :string escape hatch.
Verification recipe
Spec: element with card-id="007", card-ver="1e3", card-hex="0x10"; extract props; assert values are the original strings. Expected on unmodified code: numbers 7 / 1000 / 16 → confirmed.
Severity: P2 · Batch: B11 (input validation)
Location
src/utils/props.js:11-17+src/utils/type-guards.js:33Failure scenario
card-id="007"→7,"1e3"→1000,"0x10"→16," 42 "→42— zip codes, IDs, versions silently corrupted with no opt-out.Proposed fix
Restrict numeric coercion to
/^-?\d+(\.\d+)?$/; document; optionally support a:stringescape hatch.Verification recipe
Spec: element with
card-id="007",card-ver="1e3",card-hex="0x10"; extract props; assert values are the original strings. Expected on unmodified code: numbers 7 / 1000 / 16 → confirmed.