mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Network: Do not attempt to decode further for non-accepted protocols
Prevents 0.16 players crashing 0.15 servers
This commit is contained in:
@ -41,7 +41,11 @@ class LoginPacket extends DataPacket{
|
||||
public function decode(){
|
||||
$this->protocol = $this->getInt();
|
||||
|
||||
$str = zlib_decode($this->get($this->getInt()), 1024 * 1024 * 64); //Max 64MB
|
||||
if($this->protocol !== Info::CURRENT_PROTOCOL){
|
||||
return; //Do not attempt to decode for non-accepted protocols
|
||||
}
|
||||
$str = zlib_decode($this->get($this->getInt()), 1024 * 1024 * 64);
|
||||
|
||||
$this->setBuffer($str, 0);
|
||||
|
||||
$chainData = json_decode($this->get($this->getLInt()));
|
||||
|
Reference in New Issue
Block a user