mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #15512 from engow/automated-cherry-pick-of-#15432-origin-release-3.5
[3.5] server/auth: fix auth panic bug when user changes password
This commit is contained in:
@@ -479,7 +479,8 @@ func (as *authStore) UserChangePassword(r *pb.AuthUserChangePasswordRequest) (*p
|
||||
var password []byte
|
||||
var err error
|
||||
|
||||
if !user.Options.NoPassword {
|
||||
// Backward compatible with old versions of etcd, user options is nil
|
||||
if user.Options == nil || !user.Options.NoPassword {
|
||||
password, err = as.selectPassword(r.Password, r.HashedPassword)
|
||||
if err != nil {
|
||||
return nil, ErrNoPasswordUser
|
||||
|
||||
Reference in New Issue
Block a user