Added separate exception for packet overflows to limit log output.
Attacking a server with a hacked client causes the log to print a huge amount of stacktraces. This will limit the log output to the error message.
This commit is contained in:
@@ -13,6 +13,7 @@ import net.md_5.bungee.connection.CancelSendSignal;
|
||||
import net.md_5.bungee.connection.InitialHandler;
|
||||
import net.md_5.bungee.connection.PingHandler;
|
||||
import net.md_5.bungee.protocol.BadPacketException;
|
||||
import net.md_5.bungee.protocol.OverflowPacketException;
|
||||
|
||||
/**
|
||||
* This class is a primitive wrapper for {@link PacketHandler} instances tied to
|
||||
@@ -104,6 +105,12 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
||||
{
|
||||
handler, cause.getCause().getMessage()
|
||||
} );
|
||||
} else if ( cause instanceof DecoderException && cause.getCause() instanceof OverflowPacketException )
|
||||
{
|
||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - overflow in packet detected! {1}", new Object[]
|
||||
{
|
||||
handler, cause.getCause().getMessage()
|
||||
} );
|
||||
} else if ( cause instanceof IOException )
|
||||
{
|
||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - IOException: {1}", new Object[]
|
||||
|
Reference in New Issue
Block a user