All tickets
SUP-178
Fix password-reset response leaking account existence (user enumeration) — related to SUP-177
Description
Source ticket: SUP-177
## Problem
The password-reset flow returns a distinguishable response depending on whether the submitted email exists in the system, allowing account enumeration:
- Known email → `sendPasswordReset` resolves `true`, UI shows generic "Check Your Email" success screen.
- Unknown email → `sendPasswordReset` throws `Error('No account found with this email address')`, which is set into `error` state and rendered verbatim in the "Reset Failed" banner.
## Affected files
- `src/store/authStore.ts` — `sendPasswordReset` action (branches on `userDatabase.find(...)` and throws a distinguishing error for unknown emails).
- `src/components/auth/ForgotPasswordForm.tsx` — renders the `error` state directly to the user, exposing the distinction.
## Required fix
1. Make `sendPasswordReset` return a uniform result regardless of whether the account exists (e.g. always resolve `true`/success).
2. Do not throw or surface any "account not found" message to the client/UI.
3. Any internal diagnostic logging of match/no-match (e.g. `console.log`) must stay server-side/internal only and never be exposed via the response returned to the caller.
4. Update `ForgotPasswordForm.tsx` so the "Reset Failed" error path is reserved for genuine failures (e.g. network/send errors), not account-existence branching.
5. Replace the generic email error copy (if needed) with a uniform message such as: "If an account exists for this email, we've sent reset instructions."
## Note / scope boundary
This is strictly about response uniformity (enumeration). It is separate from the already-tracked issue that actual email delivery is not yet implemented (`sendPasswordReset` is currently an in-memory mock with no real email sending) — do not conflate the two fixes.
## Acceptance criteria
- Public/API responses for password-reset requests are identical whether or not the email is registered (same message, same status, same timing characteristics where feasible).
- No account-existence information is derivable from the response.
- Authorized internal diagnostics (logs/admin tooling) can still determine match/no-match without this being exposed externally.
Activity
- Ticket created · 10/26/2026, 11:00:34 AM