|
@@ -143,19 +143,12 @@ public class SysLoginService
|
|
|
throw new UserNotExistsException();
|
|
throw new UserNotExistsException();
|
|
|
}
|
|
}
|
|
|
// 密码如果不在指定范围内 错误
|
|
// 密码如果不在指定范围内 错误
|
|
|
- if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
|
|
|
|
- || password.length() > UserConstants.PASSWORD_MAX_LENGTH)
|
|
|
|
|
- {
|
|
|
|
|
- AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
|
|
|
|
|
- throw new UserPasswordNotMatchException();
|
|
|
|
|
- }
|
|
|
|
|
- // 用户名不在指定范围内 错误
|
|
|
|
|
- if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|
|
|
|
|
- || username.length() > UserConstants.USERNAME_MAX_LENGTH)
|
|
|
|
|
|
|
+ if (password.length() < UserConstants.PASSWORD_MIN_LENGTH)
|
|
|
{
|
|
{
|
|
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
|
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
|
|
|
throw new UserPasswordNotMatchException();
|
|
throw new UserPasswordNotMatchException();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// IP黑名单校验
|
|
// IP黑名单校验
|
|
|
String blackStr = configService.selectConfigByKey("sys.login.blackIPList");
|
|
String blackStr = configService.selectConfigByKey("sys.login.blackIPList");
|
|
|
if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr()))
|
|
if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr()))
|