Skip to content

fix(security): mail password resets to the stored admin address - #1607

Merged
rumblefrog merged 1 commit into
mainfrom
fix/password-reset-stored-email
Oct 25, 2026
Merged

rumblefrog merged 1 commit into
mainfrom
fix/password-reset-stored-email

Conversation

@rumblefrog

@rumblefrog rumblefrog commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Description

Hardens the password-reset flow.

  • Reset mail always goes to the address stored on the admin account.
  • Reset tokens are compared byte-for-byte (hash_equals).
  • The reset token is updated by account ID, not by email.
  • Adds Mailer::overrideTransportForTests() so tests can assert mail recipients.

How Has This Been Tested?

New AuthTest and lostpassword-toast.spec.ts cases. phpstan, PHPUnit, E2E and api-contract were run locally.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

@rumblefrog
rumblefrog requested a review from a team October 25, 2026 17:02
Send reset mail to the address stored on the admin row, update the
token by aid, and compare the reset token byte-exact with hash_equals.
@rumblefrog
rumblefrog force-pushed the fix/password-reset-stored-email branch from f349426 to bdd4fe7 Compare October 25, 2026 17:39
@rumblefrog
rumblefrog merged commit 91b69b9 into main Oct 25, 2026
8 checks passed
@rumblefrog
rumblefrog deleted the fix/password-reset-stored-email branch October 25, 2026 17:49
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant