fix acces password server behaviour and default password auth
This commit is contained in:
parent
902c795ecc
commit
18f37874fa
2 changed files with 4 additions and 4 deletions
|
@ -333,8 +333,6 @@ public abstract class Config {
|
||||||
public static boolean register = true;
|
public static boolean register = true;
|
||||||
@Var(name = "signEditing")
|
@Var(name = "signEditing")
|
||||||
public static boolean editSigns = true;
|
public static boolean editSigns = true;
|
||||||
@Var(name = "passwordAuthentication")
|
|
||||||
public static boolean passwordAuth = true;
|
|
||||||
@Var(name = "pubkeyAuthentication")
|
@Var(name = "pubkeyAuthentication")
|
||||||
public static boolean pubkeyAuth = true;
|
public static boolean pubkeyAuth = true;
|
||||||
@Var(name = "requireAccessPassword")
|
@Var(name = "requireAccessPassword")
|
||||||
|
@ -356,6 +354,8 @@ public abstract class Config {
|
||||||
public static boolean rabidRabbits = false;
|
public static boolean rabidRabbits = false;
|
||||||
@Var(name = "snowStacking")
|
@Var(name = "snowStacking")
|
||||||
public static boolean snowStack = false;
|
public static boolean snowStack = false;
|
||||||
|
@Var(name = "passwordAuthentication")
|
||||||
|
public static boolean passwordAuth = false;
|
||||||
|
|
||||||
@Var(name = "randomTickSpeed")
|
@Var(name = "randomTickSpeed")
|
||||||
public static int randomTick = 3;
|
public static int randomTick = 3;
|
||||||
|
|
|
@ -262,7 +262,7 @@ public final class Server implements IThreadListener {
|
||||||
}, "port");
|
}, "port");
|
||||||
Config.setCallback(new Runnable() {
|
Config.setCallback(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if(Config.password.length() < 8 || Config.password.length() > IPlayer.MAX_PASS_LENGTH) {
|
if((!Config.password.isEmpty() && Config.password.length() < 8) || Config.password.length() > IPlayer.MAX_PASS_LENGTH) {
|
||||||
Log.IO.error("Passwort muss aus 8-" + IPlayer.MAX_PASS_LENGTH + " Zeichen bestehen");
|
Log.IO.error("Passwort muss aus 8-" + IPlayer.MAX_PASS_LENGTH + " Zeichen bestehen");
|
||||||
Config.set("password", "", false);
|
Config.set("password", "", false);
|
||||||
}
|
}
|
||||||
|
@ -523,7 +523,7 @@ public final class Server implements IThreadListener {
|
||||||
this.bind(Config.port);
|
this.bind(Config.port);
|
||||||
else
|
else
|
||||||
Log.SYSTEM.warn("Kein Port definiert, verwende 'port <1024-32767>' um einen Hosting-Port festzulegen");
|
Log.SYSTEM.warn("Kein Port definiert, verwende 'port <1024-32767>' um einen Hosting-Port festzulegen");
|
||||||
if(Config.password.length() < 8)
|
if(Config.accessRequired && Config.password.length() < 8)
|
||||||
Log.SYSTEM.warn("Kein Passwort definiert, verwende 'password <8-" + IPlayer.MAX_PASS_LENGTH + " Zeichen>' um ein Zugangspasswort festzulegen");
|
Log.SYSTEM.warn("Kein Passwort definiert, verwende 'password <8-" + IPlayer.MAX_PASS_LENGTH + " Zeichen>' um ein Zugangspasswort festzulegen");
|
||||||
Thread con = new Thread(new Runnable() {
|
Thread con = new Thread(new Runnable() {
|
||||||
private final BufferedReader reader = new BufferedReader(new InputStreamReader(new BufferedInputStream(System.in)));
|
private final BufferedReader reader = new BufferedReader(new InputStreamReader(new BufferedInputStream(System.in)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue