Merge pull request #3857 from ioito/hotfix/qx-reset-password

fix: 避免旧密码覆盖新重置的密码
This commit is contained in:
yunion-ci-robot
2019-11-22 21:51:27 +08:00
committed by GitHub
+4 -2
View File
@@ -504,8 +504,10 @@ func (self *SManagedVirtualizedGuestDriver) RemoteDeployGuestForDeploy(ctx conte
return e
}
//可以从秘钥解密旧密码
desc.Password = guest.GetOldPassword(ctx, task.GetUserCred())
if len(desc.Password) == 0 {
//可以从秘钥解密旧密码
desc.Password = guest.GetOldPassword(ctx, task.GetUserCred())
}
return nil
}()
if err != nil {