From 7f441ad98e9e4686333a52a85f0a7d280e433ca3 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sat, 10 Aug 2019 00:01:43 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=A3=D1=81=D0=BB=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D0=B5=20AUthLimiter/RegLimiter=20=D0=B1=D1=8B=D0=BB=D0=BE=20?= =?UTF-8?q?=D1=81=D0=BB=D1=83=D1=87=D0=B0=D0=B9=D0=BD=D0=BE=20=D0=B8=D0=BD?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gravit/launchserver/components/AuthLimiterComponent.java | 2 +- .../pro/gravit/launchserver/components/RegLimiterComponent.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/AuthLimiterComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/AuthLimiterComponent.java index 11f0d5b5..201f8050 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/AuthLimiterComponent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/AuthLimiterComponent.java @@ -32,7 +32,7 @@ public void postInit(LaunchServer launchServer) { } public boolean preAuthHook(AuthResponse.AuthContext context, Client client) { - if (!excludeIps.contains(context.ip) && limiter.check(context.ip)) { + if (!excludeIps.contains(context.ip) && !limiter.check(context.ip)) { throw new HookException(message); } return false; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java index f5293874..ce11e0d0 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java @@ -38,7 +38,7 @@ public void postInit(LaunchServer launchServer) { public boolean registerHook(AuthHookManager.RegContext context) { - if (limiter.check(context.ip)) { + if (!limiter.check(context.ip)) { throw new HookException(message); } return false;