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
|
@ -262,7 +262,7 @@ public final class Server implements IThreadListener {
|
|||
}, "port");
|
||||
Config.setCallback(new Runnable() {
|
||||
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");
|
||||
Config.set("password", "", false);
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ public final class Server implements IThreadListener {
|
|||
this.bind(Config.port);
|
||||
else
|
||||
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");
|
||||
Thread con = new Thread(new Runnable() {
|
||||
private final BufferedReader reader = new BufferedReader(new InputStreamReader(new BufferedInputStream(System.in)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue