mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
asserts 👏 are 👏 not 👏 error 👏 checking
This commit is contained in:
parent
1513a0e092
commit
bd1d7b8d75
@ -27,7 +27,6 @@ use pocketmine\network\mcpe\protocol\LoginPacket;
|
||||
use pocketmine\Player;
|
||||
use pocketmine\scheduler\AsyncTask;
|
||||
use pocketmine\Server;
|
||||
use function assert;
|
||||
use function base64_decode;
|
||||
use function chr;
|
||||
use function count;
|
||||
@ -116,7 +115,9 @@ class VerifyLoginTask extends AsyncTask{
|
||||
|
||||
//OpenSSL wants a DER-encoded signature, so we extract R and S from the plain signature and crudely serialize it.
|
||||
|
||||
assert(strlen($plainSignature) === 96);
|
||||
if(strlen($plainSignature) !== 96){
|
||||
throw new VerifyLoginException("Wrong signature length, expected 96, got " . strlen($plainSignature));
|
||||
}
|
||||
|
||||
[$rString, $sString] = str_split($plainSignature, 48);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user