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