Pre Merge pull request !561 from showvim/master

pull/561/MERGE
showvim 2025-07-31 05:44:26 +00:00 committed by Gitee
commit 3aac34b503
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 1 deletions

View File

@ -517,7 +517,9 @@ public class SysUserServiceImpl implements ISysUserService
BeanValidators.validateWithException(validator, user);
deptService.checkDeptDataScope(user.getDeptId());
String password = configService.selectConfigByKey("sys.user.initPassword");
user.setPassword(Md5Utils.hash(user.getLoginName() + password));
// 设置salt并添加进加密规则中
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(Md5Utils.hash(user.getLoginName() + password + user.getSalt()));
user.setCreateBy(operName);
userMapper.insertUser(user);
successNum++;