mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +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:
parent
a60d41d489
commit
c1e1f5195b
@ -1053,7 +1053,7 @@ class Player{
|
||||
$this->close("Incorrect protocol #".$data["protocol1"], false);
|
||||
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->iusername = strtolower($this->username);
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user