mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +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:
parent
8e9a078ff9
commit
5851e7fe55
@ -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()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user