mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +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() === ""){
|
if($authenticated and $this->info->getXuid() === ""){
|
||||||
$error = "Expected XUID but none found";
|
$error = "Expected XUID but none found";
|
||||||
|
}elseif(!$authenticated and $this->info->getXuid() !== ""){
|
||||||
|
$error = "Unexpected XUID for non-XBOX-authenticated player";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($error !== null){
|
if($error !== null){
|
||||||
@ -543,16 +545,10 @@ class NetworkSession{
|
|||||||
|
|
||||||
$this->authenticated = $authenticated;
|
$this->authenticated = $authenticated;
|
||||||
|
|
||||||
if(!$this->authenticated){
|
if(!$this->authenticated and $authRequired){
|
||||||
if($authRequired){
|
|
||||||
$this->disconnect("disconnectionScreen.notAuthenticated");
|
$this->disconnect("disconnectionScreen.notAuthenticated");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->info->getXuid() !== ""){
|
|
||||||
$this->logger->warning("Found XUID, but login keychain is not signed by Mojang");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->logger->debug("Xbox Live authenticated: " . ($this->authenticated ? "YES" : "NO"));
|
$this->logger->debug("Xbox Live authenticated: " . ($this->authenticated ? "YES" : "NO"));
|
||||||
|
|
||||||
if($this->manager->kickDuplicates($this)){
|
if($this->manager->kickDuplicates($this)){
|
||||||
|
@ -283,7 +283,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
|||||||
|
|
||||||
$this->uuid = $this->playerInfo->getUuid();
|
$this->uuid = $this->playerInfo->getUuid();
|
||||||
$this->rawUUID = $this->uuid->toBinary();
|
$this->rawUUID = $this->uuid->toBinary();
|
||||||
$this->xuid = $authenticated ? $this->playerInfo->getXuid() : "";
|
$this->xuid = $this->playerInfo->getXuid();
|
||||||
|
|
||||||
$this->perm = new PermissibleBase($this);
|
$this->perm = new PermissibleBase($this);
|
||||||
$this->chunksPerTick = (int) $this->server->getProperty("chunk-sending.per-tick", 4);
|
$this->chunksPerTick = (int) $this->server->getProperty("chunk-sending.per-tick", 4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user