Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed login attempts are not counted if email address is null or empty #30

Open
theglobe opened this issue May 18, 2020 · 3 comments
Open

Comments

@theglobe
Copy link

theglobe commented May 18, 2020

If Email field is null or empty the UserManager will not update the database table and since AccessFailedCount is stored in the same table it will not be incremented.

await UserManager.AccessFailedAsync(user.Id).WithCurrentCulture(); returns an error, but this is not checked, in SignInManager.PasswordSignInAsync and SignInManager.TwoFactorSignInAsync.

This means that an attacker can guess passwords for such a user indefinitely.

@tymur999
Copy link

tymur999 commented Oct 8, 2020

How would that be harmful though, since no identity account can have a null email?

@theglobe
Copy link
Author

theglobe commented Oct 8, 2020

For instance if users can register with a phone number, or if using a custom user administration that allows an administrator to manually add users.

The minimal required information for a user account should be user name and password.

Is this repo maintained?

@theglobe
Copy link
Author

This is when using a UserValidator with RequireUniqueEmail = true.

A possible workaround is to set RequireUniqueEmail = false, but then you will not get any email address validation when the users enters an email address.

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

No branches or pull requests

2 participants