fix 修复密码校验错误
This commit is contained in:
parent
e2de22bdce
commit
bc6db547d6
@ -64,9 +64,7 @@ public class SysLoginService {
|
|||||||
log.info("登录用户:{} 已被停用.", username);
|
log.info("登录用户:{} 已被停用.", username);
|
||||||
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
||||||
}
|
}
|
||||||
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
|
if (!SecurityUtils.matchesPassword(password, user.getPassword())) {
|
||||||
String encodePassword = passwordEncoder.encode(password);
|
|
||||||
if (SecurityUtils.matchesPassword(user.getPassword(), encodePassword)) {
|
|
||||||
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), request);
|
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), request);
|
||||||
throw new UserPasswordNotMatchException();
|
throw new UserPasswordNotMatchException();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user