Waterfall/BungeeCord-Patches/0064-Expand-packet-decode-logging-usage.patch
Shane Freeder f49e238640
Updated Upstream (BungeeCord)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

BungeeCord Changes:
5e7dcc48 #3382: Use the correct write method for ChatChain in ClientChat packet
5cdba87b #3377: Add additional checks for protocol length limits
2022-08-20 17:43:03 +01:00

29 lines
1.5 KiB
Diff

From 1b92363555d7dfb55df0360c64e8fc18d2f5716c Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 19 Jun 2022 10:31:51 +0100
Subject: [PATCH] Expand packet-decode-logging usage
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
index 33494237..29cf4b4f 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
@@ -142,6 +142,14 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - read timed out", handler );
} else if ( cause instanceof DecoderException )
{
+ // Waterfall start
+ if (net.md_5.bungee.protocol.MinecraftDecoder.DEBUG) {
+ java.util.logging.LogRecord logRecord = new java.util.logging.LogRecord(Level.WARNING, "{0} - A decoder exception has been thrown:");
+ logRecord.setParameters(new Object[]{handler});
+ logRecord.setThrown(cause);
+ ProxyServer.getInstance().getLogger().log(logRecord);
+ } else
+ // Waterfall end
if ( cause instanceof CorruptedFrameException )
{
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - corrupted frame: {1}", new Object[]
--
2.37.2