-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
password complexity requirement not shown to user #8910
Comments
This is something annoying. |
This would be a good usability improvement, so users will know immediately what they have to correct. Ideally, it could identify which rule(s) are not passing, but I see two problems with that based on existing logic in https://github.com/go-gitea/gitea/blob/master/modules/password/password.go#L58:
Since the complexity rules are also configurable with parameters like MIN_PASSWORD_LENGTH and PASSWORD_COMPLEXITY, there would need to be some kind of logic to dynamically construct the summary of complexity rules out of locale strings. |
@bwenrich would you be able to put up a pr? |
@bwenrich some of the logic must be implemented separately as if you make a password that is too short, you will get the appropriate error message: "Password length cannot be less than 6 characters." |
Thank you @zeripath and @8ctopus for the feedback. I am not familiar yet with the full logic flow of the password validation and all the places it might be used. I see now that there is an existing separate check for setting.MinPasswordLength which produces the "password_too_short" locale message. And then the password.IsComplexEnough function checks other complexity rules associated with the "password_complexity" locale message. My opinion is that there should be some functionality to show all the password requirements to the user (both length and complexity), though I don't know how to implement this. Should there also be some way to see this (ie: a tooltip or collapseable menu) before submitting the page? |
I don't think it's necessary to show exactly what failed. Only what rules are in place. e.g.:
etc. This message requires less changes and it's easier to synthesize and translate. |
agreed just rules would suffice. |
[x]
):Description
The password complexity requirement rules are not shown on account creation/password reset so it's hard for users to figure out what is a valid password and what isn't. Therefore it would be great to show the rules in the error message as on the screenshot.
The text was updated successfully, but these errors were encountered: