diff --git a/src/network/mcpe/auth/ProcessLoginTask.php b/src/network/mcpe/auth/ProcessLoginTask.php index eab7cf8be..c65203613 100644 --- a/src/network/mcpe/auth/ProcessLoginTask.php +++ b/src/network/mcpe/auth/ProcessLoginTask.php @@ -138,6 +138,9 @@ class ProcessLoginTask extends AsyncTask{ //First link, check that it is self-signed $currentPublicKey = $headers->x5u; + }elseif($headers->x5u !== $currentPublicKey){ + //Fast path: if the header key doesn't match what we expected, the signature isn't going to validate anyway + throw new VerifyLoginException("%pocketmine.disconnect.invalidSession.badSignature"); } $derPublicKeySerializer = new DerPublicKeySerializer();