From 49bdd92faae6bc29c432f87141072e663e0dad87 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 11 Jan 2019 17:56:18 +0000 Subject: [PATCH] LoginPacket: Assert that extradata must exist --- src/pocketmine/network/mcpe/protocol/LoginPacket.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pocketmine/network/mcpe/protocol/LoginPacket.php b/src/pocketmine/network/mcpe/protocol/LoginPacket.php index 28a09b742..bad35b06b 100644 --- a/src/pocketmine/network/mcpe/protocol/LoginPacket.php +++ b/src/pocketmine/network/mcpe/protocol/LoginPacket.php @@ -163,6 +163,9 @@ class LoginPacket extends DataPacket{ $this->xuid = $claims["extraData"]["XUID"]; } } + if(!$hasExtraData){ + throw new \UnexpectedValueException("'extraData' not found in chain data"); + } $this->clientDataJwt = $buffer->get($buffer->getLInt()); $clientData = Utils::getJwtClaims($this->clientDataJwt);