Security improvements. Fixed dependency issues. Updated to 1.12.

This commit is contained in:
Hockeh 2017-11-12 18:41:03 -06:00
parent c5e0a21a12
commit 8bced5bad3
4 changed files with 19 additions and 20 deletions

24
pom.xml
View file

@ -23,7 +23,7 @@
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>LATEST</version>
<version>2.26</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -35,31 +35,29 @@
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.11.2-R0.1-SNAPSHOT</version>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

View file

@ -79,6 +79,7 @@ public class CapatchafyCommand implements CommandExecutor
else if (args[1].equalsIgnoreCase("strict") || args[1].equalsIgnoreCase("3"))
{
Capatchafy.securityLevel = 3;
Capatchafy.configs.ipList.clear();
}
else
{

View file

@ -100,16 +100,16 @@ public class Configuration
{
case 1:
{
ipList.add(ip);
if (!ipList.contains(ip)) ipList.add(ip);
alwaysAuthorizedList.add(ip);
}
case 2:
{
ipList.add(ip);
if (!ipList.contains(ip)) ipList.add(ip);
}
case 3:
{
ipList.add(ip);
if (!ipList.contains(ip)) ipList.add(ip);
}
}
}

View file

@ -36,11 +36,11 @@ public class Listeners implements Listener
public long removeAllPointsTime = 7L; //Remove all points after x seconds.
public int maxAttacks = 3; //Set to 0 to disable this function.
public long startupThrottleTime = 1L; //The throttle time on startup. 1
public int startupThrottleLogins = 20; //The throttle logins on startup. 20
public long startupThrottleTime = 1L; //The throttle time on startup. Default: 1
public int startupThrottleLogins = 20; //The throttle logins on startup. Default: 20
public long defaultThrottleTime = 3L; //After 30 seconds, the server defaults back to this. 3
public int defaultThrottleLogins = 8; //9
public long defaultThrottleTime = 3L; //After 30 seconds, the server defaults back to this. Default: 3
public int defaultThrottleLogins = 8; //Default: 9
public static String url;