add ability to tempban users after x wrong logins - ref #520 #192

This commit is contained in:
Gnat008
2016-06-12 13:40:34 -04:00
parent d6e1fd5ceb
commit ac4add9f54
7 changed files with 277 additions and 3 deletions
@@ -100,6 +100,19 @@ public class SecuritySettings implements SettingsClass {
public static final Property<List<String>> UNSAFE_PASSWORDS =
newLowercaseListProperty("settings.security.unsafePasswords", "123456", "password", "qwerty", "12345", "54321");
@Comment("Tempban users if they enter the wrong password too many times")
public static final Property<Boolean> TEMPBAN_ON_MAX_LOGINS =
newProperty("Security.tempban.enableTempban", false);
@Comment("How many times a user can attempt to login before being tempbanned")
public static final Property<Integer> MAX_LOGIN_TEMPBAN =
newProperty("Security.tempban.maxLoginTries", 10);
@Comment({"The length of time a player will be tempbanned in minutes",
"Default: 480 minutes, or 8 hours"})
public static final Property<Integer> TEMPBAN_LENGTH =
newProperty("Security.tempban.tempbanLength", 480);
private SecuritySettings() {
}