Sanity check pos passed by client
Prevents malicious clients from loading arbitrary chunks.
Thanks to pau101 for spotting it.
(cherry picked from commit 7c19e2e
)
This commit is contained in:
parent
078ab16b43
commit
324d49e3ac
|
@ -67,6 +67,9 @@ public class ItemRouterAmountPacketProcessor implements IMessage, IMessageHandle
|
|||
World world = DimensionManager.getWorld(dimension);
|
||||
if (world != null)
|
||||
{
|
||||
if (!world.isBlockLoaded(pos))
|
||||
return;
|
||||
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileFilteredRoutingNode)
|
||||
{
|
||||
|
|
|
@ -63,6 +63,9 @@ public class ItemRouterButtonPacketProcessor implements IMessage, IMessageHandle
|
|||
World world = DimensionManager.getWorld(dimension);
|
||||
if (world != null)
|
||||
{
|
||||
if (!world.isBlockLoaded(pos))
|
||||
return;
|
||||
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileFilteredRoutingNode)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue