mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +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);
|
$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{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user