v1.1 注册ip限制-同一ip同一天内只能注册max个
This commit is contained in:
@@ -148,7 +148,7 @@ public class AccountManageService {
|
||||
IpMaxRegisterLimitConfig config = getLimitConfig();
|
||||
if (null != config && config.getOpen()){
|
||||
int count = accountService.getRegisterIpCountByOneDay(ipAddress);
|
||||
if (count > config.getMax()) {
|
||||
if (count >= config.getMax()) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.SIGN_IP_TO_OFTEN, "注册过于频繁");
|
||||
}
|
||||
}
|
||||
@@ -334,7 +334,7 @@ public class AccountManageService {
|
||||
IpMaxRegisterLimitConfig config = getLimitConfig();
|
||||
if (null != config && config.getOpen()){
|
||||
int count = accountService.getRegisterIpCountByOneDay(ipAddress);
|
||||
if (count > config.getMax()) {
|
||||
if (count >= config.getMax()) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.SIGN_IP_TO_OFTEN, "注册过于频繁");
|
||||
}
|
||||
}
|
||||
@@ -793,7 +793,7 @@ public class AccountManageService {
|
||||
IpMaxRegisterLimitConfig config = getLimitConfig();
|
||||
if (null != config && config.getOpen()){
|
||||
int count = accountService.getRegisterIpCountByOneDay(ipAddress);
|
||||
if (count > config.getMax()) {
|
||||
if (count >= config.getMax()) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.SIGN_IP_TO_OFTEN, "注册过于频繁");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user