From 8a4ebcc90709660c7200c710689ff3b7ff9e9379 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sat, 22 Jul 2023 18:12:31 +0300 Subject: [PATCH] username is now limited by 16 --- src/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index 98dcd292..381249c9 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1332,7 +1332,7 @@ class Player{ $this->close("Incorrect protocol #" . $packet->protocol1, false); return; } - if(preg_match('#[^a-zA-Z0-9_]#', $this->username) > 0 or $this->username === "" or $this->iusername === "rcon" or $this->iusername === "console" or $this->iusername === "server"){ + if(preg_match('#[^a-zA-Z0-9_]#', $this->username) > 0 || $this->username === "" || $this->iusername === "rcon" || $this->iusername === "console" || $this->iusername === "server" || strlen($this->iusername) > 16){ $this->close("Bad username", false); return; }