Change user workflows to prevent user enumeration attacks #8537
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.
🎩 What? Why?
On some workflows, it's possible to check if an email was registered in the application. For instance, in the "Forgot your password?" page if an attacker tries with a registered email, she'll get an error message (
You will receive an email with instructions on how to reset your password in a few minutes.
) that's different to a non-existing user account ("could not be found. Did you sign up previously?
"). This attack gets the name of "Account enumeration".This PR fixes this partially, as it isn't solved in registration form, but it is solved in others like "forgot your password" or "resend unlock instructions".
Testing
📷 Screenshots