mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 00:38:18 +00:00
Remove unnecessary password.isEmpty check.
This commit is contained in:
@@ -179,12 +179,10 @@ public final class LoginDecoder extends StatefulFrameDecoder<LoginDecoderState>
|
|||||||
String username = BufferUtil.readString(securePayload);
|
String username = BufferUtil.readString(securePayload);
|
||||||
String password = BufferUtil.readString(securePayload);
|
String password = BufferUtil.readString(securePayload);
|
||||||
|
|
||||||
if (!(username.length() < 13 || password.length() > 5 && password.length() < 21)) {
|
if (password.length() < 6 || password.length() > 20) {
|
||||||
throw new Exception("Invalid username or password length.");
|
throw new Exception("Invalid password.");
|
||||||
}
|
} else if (username.isEmpty() || username.length() > 12) {
|
||||||
|
throw new Exception("Invalid username.");
|
||||||
if (username.isEmpty() || password.isEmpty()) {
|
|
||||||
throw new Exception("Invalid username or password.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] seed = new int[4];
|
int[] seed = new int[4];
|
||||||
|
|||||||
Reference in New Issue
Block a user