5 Commits

Author SHA1 Message Date
Alex Dunmow
8bd92ea5c4 feat(captcha): single-use verification tokens (replay hardening)
VerifyToken now consumes a redemption token on its first successful verify:
a replayed token within its 5-min TTL is rejected. Mirrors the existing
single-use challenge-nonce store with a per-Server used-token store keyed on
the token's random id, same GC/expiry approach (entries live only for the
remaining TTL). The token is burned only on a successful verify (valid HMAC +
unexpired + unused); forged/expired tokens never touch the store.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 12:32:52 +08:00
Alex Dunmow
cbc9ff495f feat(captcha): stateless Cap protocol Server (challenge/redeem/verify) 2026-07-03 17:24:19 +08:00
Alex Dunmow
7b15ce70d0 feat(captcha): in-process nonce store for single-use enforcement 2026-07-03 17:16:19 +08:00
Alex Dunmow
f5cbb56df7 feat(captcha): HMAC-signed stateless challenge + verification tokens 2026-07-03 17:13:24 +08:00
Alex Dunmow
84723991cd feat(captcha): FNV-1a + xorshift32 PRNG matching Cap.js widget
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 17:12:04 +08:00