mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Update LoginDecoder.java.
This commit is contained in:
1 parent
93d7b5a92e
commit
e9669d7e90
1 file changed
+3
-3
@@ -179,11 +179,11 @@ public final class LoginDecoder extends StatefulFrameDecoder<LoginDecoderState>
|
||||
String username = BufferUtil.readString(securePayload);
|
||||
String password = BufferUtil.readString(securePayload);
|
||||
|
||||
if (username.length() > 12 || password.length() > 20) {
|
||||
throw new Exception("Username or password too long.");
|
||||
if (!(username.length() < 13 || password.length() > 5 && password.length() < 21)) {
|
||||
throw new Exception("Invalid username or password length.");
|
||||
}
|
||||
|
||||
if (username.equals("") || password.equals("")) {
|
||||
if (username.isEmpty() || password.isEmpty()) {
|
||||
throw new Exception("Invalid username or password.");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user