-
Notifications
You must be signed in to change notification settings - Fork 864
RequireNonLetterOrDigit does not allow to use letters and digits #709
Comments
Do you have a sample password that fails? |
user0Pass |
Seems to be a bug. Here's the corresponding line: https://github.com/aspnet/Identity/blob/3.0.0-rc1/src/Microsoft.AspNet.Identity/PasswordValidator.cs#L55 And relevant code:
|
That seems to be the bug. If a password have a digit, with |
Maybe the name should have been @rustd? What do you think? |
It's always been this way. it means there must be one non letter and non digit. |
Ah, I think it is starting to make sense to me... So, if we could use parenthesis in names it would be called Maybe we can come up with a name that is no ambiguous. Was |
I forget the exact naming history. I think it was called that at some point. Also RequireNonLetterAndDigit I think too. |
See the SO questions: http://stackoverflow.com/questions/25865952/requirenonletterordigit-not-correctly-validated (I think there is a bug in the question, e.g. the flag should be set to true instead of false) And this forum thread: It seems customers have been hitting the ambiguity in the property name, the API documentation for it and even the validation error for a while. |
Also, there should be a way to require nonletter character. I think it was possible in previous version of framework. |
How about we go with RequireNonAlphanumeric and change the error text to be: "Passwords must have at least one non alphanumeric character." |
@HaoK sounds very good! 😄 |
👍 |
I used ASP.NET 5 MVC6 Project Template with User Authentication, changed default password requirements to:
When I try to register with passwords having Upper, lower and digit the user manager fails to create an account because
Failed : PasswordRequiresNonLetterAndDigit
When I changeRequireNonLetterOrDigit
to false problem disappears.1.0.0-rc1-final
The text was updated successfully, but these errors were encountered: