fix
This commit is contained in:
parent
f946f2926a
commit
06b826769b
|
@ -55,6 +55,7 @@ func (l *UpdateLdapUserPwdLogic) UpdateLdapUserPwd(req *types.UpdateLdapUserPwdR
|
|||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, err.Error())
|
||||
}
|
||||
if len(user.Password) > 7 && user.Password[:7] == "{crypt}" {
|
||||
//解密旧的密码
|
||||
oldPwd, err := encryption_decryption.CBCDecrypt(user.Password[7:])
|
||||
if err != nil {
|
||||
|
@ -65,6 +66,7 @@ func (l *UpdateLdapUserPwdLogic) UpdateLdapUserPwd(req *types.UpdateLdapUserPwdR
|
|||
if oldPwd != req.OldPassword {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "旧密码不对,请重新尝试")
|
||||
}
|
||||
}
|
||||
//加密新的密码
|
||||
newPwd, err := encryption_decryption.CBCEncrypt(req.NewPassword)
|
||||
if err != nil {
|
||||
|
|
|
@ -166,7 +166,7 @@ type GetLdapUserInfoReq struct {
|
|||
}
|
||||
|
||||
type GetLdapUserInfoRsp struct {
|
||||
UserId int64 `json:"userId"`
|
||||
UserId int64 `json:"user_id"`
|
||||
UserDN string `json:"user_dn"`
|
||||
UserName string `json:"user_name"` //用户名
|
||||
Email string `json:"email"` //邮箱
|
||||
|
|
|
@ -249,7 +249,7 @@ type GetLdapUserInfoReq {
|
|||
UserDN string `form:"user_dn"` //用户dn
|
||||
}
|
||||
type GetLdapUserInfoRsp {
|
||||
UserId int64 `json:"userId"`
|
||||
UserId int64 `json:"user_id"`
|
||||
UserDN string `json:"user_dn"`
|
||||
UserName string `json:"user_name"` //用户名
|
||||
Email string `json:"email"` //邮箱
|
||||
|
|
Loading…
Reference in New Issue
Block a user