mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
Fix for players connecting with a blank username field
Fix for players connecting with a blank username field (#636).
This commit is contained in:
@@ -1053,7 +1053,7 @@ class Player{
|
|||||||
$this->close("Incorrect protocol #".$data["protocol1"], false);
|
$this->close("Incorrect protocol #".$data["protocol1"], false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(preg_match('#[^a-zA-Z0-9_]#', $data["username"]) == 0){
|
if(preg_match('#[^a-zA-Z0-9_]#', $data["username"]) == 0 && $data["username"] != ""){
|
||||||
$this->username = $data["username"];
|
$this->username = $data["username"];
|
||||||
$this->iusername = strtolower($this->username);
|
$this->iusername = strtolower($this->username);
|
||||||
}else{
|
}else{
|
||||||
|
Reference in New Issue
Block a user