mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue