[5.x] Always show success when using forgot password form#14539
Merged
jasonvarga merged 4 commits into5.xfrom Apr 23, 2026
Merged
[5.x] Always show success when using forgot password form#14539jasonvarga merged 4 commits into5.xfrom
jasonvarga merged 4 commits into5.xfrom
Conversation
Normalize INVALID_USER and RESET_THROTTLED responses from the password broker to RESET_LINK_SENT so the endpoint does not reveal whether the submitted email belongs to a registered user. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After password reset responses are normalized to always succeed, the failure path in sendResetLinkFailedResponse is unreachable with the default broker. Drop it along with the obsolete external-URL test that relied on it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Password::INVALID_USERandPassword::RESET_THROTTLEDresponses from the broker toPassword::RESET_LINK_SENTinSendsPasswordResetEmails::sendResetLinkEmail(), so the endpoint responds identically whether or not the email belongs to a registered (and un-throttled) user.PasswordBrokeronly reaches the throttle check after successfully retrieving a user — a throttled response would otherwise still indicate that a matching user exists.Test plan
vendor/bin/phpunit tests/Tags/User/ForgotPasswordFormTest.phpvendor/bin/phpunit tests/Auth/CpForgotPasswordTest.phpvendor/bin/phpunit tests/Auth/ForgotPasswordTest.php/cp/auth/password/emailand to/!/auth/password/emailand confirm the generic "reset link emailed" message is shown with noemailerror flashed.🤖 Generated with Claude Code