【改进】密码校验
This commit is contained in:
@@ -144,9 +144,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
}
|
||||
|
||||
// 验证密码(MD5加密)
|
||||
// String encryptPassword = DigestUtils.md5DigestAsHex(password.getBytes(StandardCharsets.UTF_8));
|
||||
String encryptPassword = DigestUtils.md5DigestAsHex(password.getBytes(StandardCharsets.UTF_8));
|
||||
// 客户端已经使用加密
|
||||
if (!password.equals(user.getPassword())) {
|
||||
if (!encryptPassword.equals(user.getPassword())) {
|
||||
throw new RuntimeException(I18nUtil.getMessage("error.password.incorrect"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user