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

Minimum password length + Static Pages fixes #11474

Merged
merged 11 commits into from
Oct 30, 2019
Merged

Conversation

paglias
Copy link
Contributor

@paglias paglias commented Oct 23, 2019

Enforce a minimum password length of 8 characters.

return this.password.length >= MINIMUM_PASSWORD_LENGTH;
},
passwordInvalid () {
if (this.password.length <= 0) return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this <=0 line correct? Doesn't it mean that passwordInvalid will be false (i.e., password will be considered valid) if the length is 0 or less?

Are this line and also line 864 needed at all? I think the checks against MINIMUM_PASSWORD_LENGTH will handle all the cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this <=0 line correct? Doesn't it mean that passwordInvalid will be false (i.e., password will be considered valid) if the length is 0 or less?

The idea here is (taken from other fields) not to show the error class until the user has typed something int to field

passwordInvalid () {
if (this.password.length <= 0) return false;
return this.password.length < MINIMUM_PASSWORD_LENGTH;
},
passwordConfirmValid () {
if (this.passwordConfirm.length <= 3) return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be changed to 8 or the whole line deleted? I don't think a length check is needed here because the only important check is that the password confirm value is the same as the password value (and we're already checking length for the password).

Same for passwordConfirmInvalid below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <= 3 was a previous check that I think was supposed not to show the error until the user has typed at least 3 characters, which I feel like makes sense from an UX perspective but I'm not 100% sure

@paglias paglias changed the title Minimum password length Minimum password length + Static Pages fixes Oct 29, 2019
@paglias paglias merged commit e1d30ee into develop Oct 30, 2019
@paglias paglias deleted the minimum-password-length branch October 30, 2019 12:47
@SabreCat SabreCat restored the minimum-password-length branch October 31, 2019 18:16
SabreCat added a commit that referenced this pull request Oct 31, 2019
paglias added a commit that referenced this pull request Nov 4, 2019
@paglias paglias deleted the minimum-password-length branch December 18, 2019 17:49
paglias added a commit that referenced this pull request Dec 18, 2019
* Revert "Revert "Minimum password length + Static Pages fixes (#11474)""

This reverts commit d1afbf4.

* add min length for reset password
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

Successfully merging this pull request may close these issues.

3 participants