【改进】密码校验

This commit is contained in:
2025-11-12 09:26:59 +08:00
parent c9332b85db
commit 6606438862

View File

@@ -144,9 +144,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
} }
// 验证密码MD5加密 // 验证密码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")); throw new RuntimeException(I18nUtil.getMessage("error.password.incorrect"));
} }