Skip to content

Security fix: forgot password and sign-up give one answer for every email - #314

Merged
nambok merged 1 commit into
mainfrom
forgot-password-one-answer
Nov 4, 2026
Merged

nambok merged 1 commit into
mainfrom
forgot-password-one-answer

Conversation

@nambok

@nambok nambok commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Security fix. Since #311 the sign-in page showed a different sentence for each forgot-password case (has an account, on the team without one, invited, not on this install). Anyone could use it to learn which emails have accounts or are on the team. The page now gives one answer for every email, and so does sign-up from an invite link on a self-hosted install.

Changes

  • Forgot password: whatever the server answers, the page shows "If can sign in here, we've sent a reset code or a set-up link." (hosted: "...we've sent a reset code."). It always moves on to the reset code step. On a self-hosted install, that step adds "Got a set-up link instead of a code? There's no code to enter: open the link in that email to set up your account."
  • Senders: both lines, always, from /auth/methods: "Reset codes come from ." and "Set-up links come from .", then "Not in your inbox after a few minutes? Check spam or quarantine, or ask IT to allow those addresses."
  • Self-hosted sign-up (invite link): "If can join here, we've sent a verification code. No code after a few minutes? If you already have an account, sign in or use Forgot password; otherwise ask an admin to invite you." The platform side answers the same for invited, existing and refused emails.
  • ForgotStatus is now only sent. The error box has data-testid="auth-error" for tests.
  • Removed the e2e tests that asserted the per-case messages.

Verification

  • npm run lint, npm run typecheck, static npm run build.
  • E2E (static export): sign-in-methods.spec.ts, mobile-sign-in.spec.ts (22 passed), audit-shell.spec.ts (36 passed).
  • New e2e: five mocked forgot-password replies (the new sent, plus each per-case status an older gateway gave) render the same message, sender lines, next step and no error. Also: an SES sender for Cognito shows that address, and self-hosted sign-up shows the one answer.

Security fix. The sign-in page showed a different sentence for each
forgot-password case (has an account, on the team without one, invited,
not on this install), so anyone could learn which emails have accounts or
are on the team.

Forgot password now says the same for everyone: "If <email> can sign in
here, we've sent a reset code or a set-up link." It names both senders
from /auth/methods, says to check spam or quarantine or ask IT to allow
those addresses, and always moves on to the reset code, with a note that
a set-up link may have come instead.

Sign-up from an invite link on a self-hosted install reads the same way:
"If <email> can join here, we've sent a verification code."
@nambok
nambok merged commit d26225b into main Nov 4, 2026
10 checks passed
@nambok
nambok deleted the forgot-password-one-answer branch November 4, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant