Don't allow login if the user has no username
This commit is contained in:
1 parent
0b0c0a5ed6
commit
73ab61ffaf
1 file changed
+1
-1
+1
-1
@@ -412,7 +412,7 @@ export default class WSServer {
|
||||
switch (msgArr[1]) {
|
||||
case "2":
|
||||
// Login
|
||||
if (!client.LoginRateLimit.request()) return;
|
||||
if (!client.LoginRateLimit.request() || !client.username) return;
|
||||
if (msgArr.length !== 3) return;
|
||||
var sha256 = createHash("sha256");
|
||||
sha256.update(msgArr[2]);
|
||||
|
||||
Reference in new issue
Block a user