Repository navigation
Storefront sign-in and password recovery: answer the same whether or not an address has an account - #1114
Merged
Conversation
…not an address has an account
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.
The storefront told a visitor which e-mail addresses have an account, before any password was checked:
The panels already answer recovery the same way for every address (
PanelPasswordRecoveryService); the storefront now does too.Changes
LoginValidator(storefront): an unknown, deleted or not registered account gets the wrong-password message. Whether the account is active is told only after the right password; a wrong password on an inactive account now counts as a failed sign-in too. A locked-out account still gets the locked-out message, before the password is checked, so the lockout cannot be used to test passwords.PasswordRecoveryValidatorchecks the address and the captcha only.PasswordRecoverySendCommandHandlersends no message, and stores no token, for an account that is deleted, inactive, locked out, not registered, or signs in only through the identity provider; the page says "email has been sent" in every case.PasswordRecoveryConfirmValidator: an unknown address, or an account in any of those states, reads as a wrong link, as in the panels.Notes
Account.Login.WrongCredentials.CustomerNotExist,.Deleted,.NotRegistered,Account.PasswordRecovery.EmailNotFound,.Deleted,.NotActive,.LockedOut,.NotRegistered) stay in the language files.Tests
LoginValidatorAccountStateTests(new): unknown, deleted and not registered accounts get the wrong-password message; an inactive account with a wrong password gets it and is counted; with the right password it gets "not active".PasswordRecoverySendCommandHandlerTests: no message for an inactive, deleted, locked-out or not registered account.PasswordRecoveryConfirmValidatorExternalSignInTests: an unknown address and an inactive account read as a wrong link.PasswordRecoveryValidatoris removed: it no longer looks the account up; the controller's lookup still passes the store.Grand.Web.Tests(665) pass.