mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
disallow logins from players with phony XUIDs
this simplifies XUID handling.
This commit is contained in:
parent
e07523056d
commit
85051554c4
@ -533,6 +533,8 @@ class NetworkSession{
|
||||
}
|
||||
if($authenticated and $this->info->getXuid() === ""){
|
||||
$error = "Expected XUID but none found";
|
||||
}elseif(!$authenticated and $this->info->getXuid() !== ""){
|
||||
$error = "Unexpected XUID for non-XBOX-authenticated player";
|
||||
}
|
||||
|
||||
if($error !== null){
|
||||
@ -543,15 +545,9 @@ class NetworkSession{
|
||||
|
||||
$this->authenticated = $authenticated;
|
||||
|
||||
if(!$this->authenticated){
|
||||
if($authRequired){
|
||||
$this->disconnect("disconnectionScreen.notAuthenticated");
|
||||
return;
|
||||
}
|
||||
|
||||
if($this->info->getXuid() !== ""){
|
||||
$this->logger->warning("Found XUID, but login keychain is not signed by Mojang");
|
||||
}
|
||||
if(!$this->authenticated and $authRequired){
|
||||
$this->disconnect("disconnectionScreen.notAuthenticated");
|
||||
return;
|
||||
}
|
||||
$this->logger->debug("Xbox Live authenticated: " . ($this->authenticated ? "YES" : "NO"));
|
||||
|
||||
|
@ -283,7 +283,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
||||
|
||||
$this->uuid = $this->playerInfo->getUuid();
|
||||
$this->rawUUID = $this->uuid->toBinary();
|
||||
$this->xuid = $authenticated ? $this->playerInfo->getXuid() : "";
|
||||
$this->xuid = $this->playerInfo->getXuid();
|
||||
|
||||
$this->perm = new PermissibleBase($this);
|
||||
$this->chunksPerTick = (int) $this->server->getProperty("chunk-sending.per-tick", 4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user