feat: 登录强制校验弱密码&关键信息加密传输

This commit is contained in:
meilin.huang
2022-07-18 20:36:31 +08:00
parent db554ebdc9
commit 5271bd21e8
29 changed files with 1804 additions and 1327 deletions

View File

@@ -57,6 +57,11 @@ func (m *Machine) SaveMachine(rc *ctx.ReqCtx) {
entity := new(entity.Machine)
utils.Copy(entity, machineForm)
// 密码解密,并使用解密后的赋值
originPwd, err := utils.DefaultRsaDecrypt(machineForm.Password, true)
biz.ErrIsNilAppendErr(err, "解密密码错误: %s")
entity.Password = originPwd
// 密码脱敏记录日志
machineForm.Password = "****"
rc.ReqParam = machineForm