diff --git a/server/service/auth/password.go b/server/service/auth/password.go index 20efd14..16b6202 100644 --- a/server/service/auth/password.go +++ b/server/service/auth/password.go @@ -70,7 +70,9 @@ func (s *Service) IsPasswordUpdated(c *gin.Context) { err = bcrypt.CompareHashAndPassword([]byte(account.Password), []byte("admin")) rsp.OkRspWithData(c, &proto.IsPasswordUpdatedRsp{ - IsUpdated: err == nil, + // If the hash is not valid, still assume it's not updated + // The error we want to see is password and hash not matching + IsUpdated: err == bcrypt.ErrMismatchedHashAndPassword, }) }