mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
yucky fix for crash on invalid keychain
This commit is contained in:
parent
a4c7744188
commit
5a5ce84ebc
@ -527,14 +527,18 @@ class NetworkSession{
|
|||||||
}, $reason);
|
}, $reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAuthenticationStatus(bool $authenticated, bool $authRequired, ?string $error, PublicKeyInterface $clientPubKey) : void{
|
public function setAuthenticationStatus(bool $authenticated, bool $authRequired, ?string $error, ?PublicKeyInterface $clientPubKey) : void{
|
||||||
if(!$this->connected){
|
if(!$this->connected){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($authenticated and $this->info->getXuid() === ""){
|
if($error === null){
|
||||||
$error = "Expected XUID but none found";
|
if($authenticated and $this->info->getXuid() === ""){
|
||||||
}elseif(!$authenticated and $this->info->getXuid() !== ""){
|
$error = "Expected XUID but none found";
|
||||||
$error = "Unexpected XUID for non-XBOX-authenticated player";
|
}elseif(!$authenticated and $this->info->getXuid() !== ""){
|
||||||
|
$error = "Unexpected XUID for non-XBOX-authenticated player";
|
||||||
|
}elseif($clientPubKey === null){
|
||||||
|
$error = "Missing client public key"; //failsafe
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($error !== null){
|
if($error !== null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user