🔒 密码加密由 BCrypt 修改为 MD5

This commit is contained in:
zhaojun1998
2019-12-07 21:59:41 +08:00
parent d4978b0903
commit 1d60395161
4 changed files with 22 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
package im.zhaojun.common.service;
import cn.hutool.crypto.SecureUtil;
import im.zhaojun.common.config.StorageTypeFactory;
import im.zhaojun.common.model.SystemConfig;
import im.zhaojun.common.model.constant.SystemConfigConstant;
@@ -105,7 +106,7 @@ public class SystemConfigService {
usernameConfig.setValue(username);
systemConfigRepository.save(usernameConfig);
password = new BCryptPasswordEncoder().encode(password);
password = SecureUtil.md5(password);;
SystemConfig systemConfig = systemConfigRepository.findByKey(SystemConfigConstant.PASSWORD);
systemConfig.setValue(password);