From eaf1c3853ecfdde918a3ccbc46ea9f1d55698728 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Mon, 26 Aug 2024 10:08:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=AF=BC=E5=85=A5=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index f5170a2..f5d484a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -524,7 +524,8 @@ public class SysUserServiceImpl extends ServiceImpl imple if (StringUtils.isNull(u)) { BeanValidators.validateWithException(validator, user); - user.setPassword(Md5Utils.hash(user.getLoginName() + password)); + user.setSalt(ShiroUtils.randomSalt()); + user.setPassword(Md5Utils.hash(user.getLoginName() + password + user.getSalt())); user.setCreateBy(operName); userMapper.insertUser(user); successNum++;