-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Never allow an empty password to validate #9682
Conversation
3be7ac1
to
d6d897b
Compare
Maybe add a test? |
Does not seem to work, all tests fail |
d6d897b
to
465caef
Compare
Yeah, so the reason tests failed is because I wrote: // IsPasswordSet checks if the password is set or left empty
func (u *User) IsPasswordSet() bool {
return u.ValidatePassword("")
} instead of: // IsPasswordSet checks if the password is set or left empty
func (u *User) IsPasswordSet() bool {
return !u.ValidatePassword("")
} yes, I'm an eejit. |
Codecov Report
@@ Coverage Diff @@
## master #9682 +/- ##
=========================================
- Coverage 42.2% 42.2% -0.01%
=========================================
Files 591 591
Lines 78085 78085
=========================================
- Hits 32959 32953 -6
- Misses 41080 41085 +5
- Partials 4046 4047 +1
Continue to review full report at Codecov.
|
* Restore IsPasswordSet previous value * Update models/user.go Co-authored-by: Lauris BH <[email protected]>
#6023 caused a regression.