-
Notifications
You must be signed in to change notification settings - Fork 700
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
Don't check for existing password emptyness #315
Conversation
Pointed out by @pugabear, it's possible for a user to have an empty password. There isn't really a need to check for password emptyness, it will simply fail with wrong old password instead.
@maxpoulin64, why not reversing this and instead prevent creating/using empty passwords altogether? |
Do you think there is a value as reviewing/merging this by itself, or the changes you have here will be removed with the other fix you mention? |
No, I was thinking of doing both. I consider the current behavior to be a bug, because it's possible to get into a situation where the user can't use the feature because of conflicting conditions. The user will still be able to get into this situation if the json is edited manually, but it's reasonable to disallow it through the official ways. And there really is no possible harm by not doing that check, as comparing an empty password to a non-empty password will return a failure anyway. |
👍 The check is pretty much unnecessary here, as it compares the password either way. Merge whenever. |
👍 |
Don't check for existing password emptyness
Pointed out by @pugabear, it's possible for a user to have an empty password. There isn't really a need to check for password emptyness, it will simply fail with wrong old password instead. This allows users with an empty password to be created and allows them to set a password.
While I think a temporary password should be used instead, we allow creating a user with no password so we should also handle it.