Skip to content

Commit dea5530

Browse files
committed
1 parent d1bf845 commit dea5530

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/db/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (u *User) IsPasswordMatch(plainPassword string) bool {
5151
} else {
5252
current = u.Password
5353
}
54-
if err := bcrypt.CompareHashAndPassword(current, []byte(plainPassword)); err == nil {
54+
if err := bcrypt.CompareHashAndPassword(current, []byte(plainPassword)); err == nil && len(u.Password) != 0 {
5555
return true
5656
}
5757
return false

0 commit comments

Comments
 (0)