Skip to content

Commit

Permalink
server/auth: fix auth panic bug when user changes password
Browse files Browse the repository at this point in the history
  • Loading branch information
tangcong committed Mar 9, 2023
1 parent 6bd7660 commit 463eb98
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions server/auth/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,9 @@ func (as *authStore) UserChangePassword(r *pb.AuthUserChangePasswordRequest) (*p
var password []byte
var err error

if !user.Options.NoPassword {
password, err = as.selectPassword(r.Password, r.HashedPassword)
if err != nil {
return nil, ErrNoPasswordUser
}
password, err = as.selectPassword(r.Password, r.HashedPassword)
if err != nil {
return nil, ErrNoPasswordUser
}

updatedUser := &authpb.User{
Expand Down

0 comments on commit 463eb98

Please sign in to comment.