Skip to content
SprecherEast
Issue 290

Sign-up hardening: response timing, accounts pre-claimed on someone else's email, ?email in logs

Back to our plan
Open
enhancementauthpriority: low

Problem

The independent review of #288 found three minor gaps in sign-up. None blocks it while residents can only read.

  1. Timing: the response time can show whether an account already uses an email: a duplicate is refused before the password is hashed. This is the same kind of leak #282 tracks for forgot password.
  2. Pre-claimed account: someone can sign up with another person's address and their own password. If that person then opens the verification link they never asked for, the account is verified with the other person's password. The impact is low today, but it matters before residents can comment or vote (#164).
  3. ?email= prefill: the confirm page's Yes opens /sign-up?email=…. The page clears the address bar on load, but the address can still reach server access logs and browser history.

Acceptance criteria

  • The response time doesn't depend on whether an account exists (solve it together with #282's approach).
  • A verification email that someone else triggered can't hand that person an account with a password they don't know. For example, verifying asks the visitor to set the password, or the email says plainly that someone else started this sign-up.
  • The email reaches /sign-up without appearing in a URL, or that trade-off is recorded as accepted.

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab