Skip to content
SprecherEast
Issue 308

Per-connection limit on account verification (/verify-account)

Back to our plan
Open
enhancementauthpriority: low

Follow-up from the review of #307.

Problem

The verifyAccount server action has no per-connection limit. Tokens can't be guessed, so this isn't a security hole. But since #307, every press also costs a Cloudflare Turnstile siteverify call, and a script holding no valid token could still make the server call Cloudflare on every request.

Proposed fix

Count presses per connection before the robot check, the way the email-confirmation endpoint does (20 an hour, CONFIRMATION_LIMITS). If it fits, reuse createRequestGuard.

Acceptance criteria

  • Not done: More than the limit from one connection in an hour answers "too many tries" without calling Turnstile or Payload
  • Not done: Test

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab