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.
fix: improve password validation flow #15132
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
fix: improve password validation flow #15132
Changes from 12 commits
b93dc6b
cf31dde
309d839
388a58b
f9cce4c
8a5e63f
8f695ab
c103559
dc46019
37072ee
b4b8b06
0efd24f
a6ee1cc
51b1e51
e2128e6
f37ef9e
36cadeb
175b4bf
f33eac2
2e0941b
3869dd5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit about referring to all of this stuff as "user password" validation: the password is not yet attached to a user, so it's not a user password, it's just a password, so I'd expect it to be called
validatePassword
and so on.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now this logic stays pretty simple - here's the place where we'll be able to apply all the validation logic we want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I'm concerned here, we are squishing together three distinct separate changes:
Of these three options, 1) and 2) are relatively innocuous. 3) is the one I'm mainly concerned about.
I propose keeping the existing password validation logic (via entropy) in this PR and opening a separate PR to modify the password validation logic if required.
My proposal for a roughly equivalent non-entropy-based password validation logic is:
[^a-zA-Z0-9\s]
)EDIT: we should however be extremely careful if we change the validation, as users could have existing passwords that are valid per entropy but invalid per the above rule.