diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java index f1f383a7..1d3d2824 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java @@ -1,5 +1,6 @@ package net.md_5.bungee.connection; +import com.google.common.base.Preconditions; import net.md_5.bungee.BungeeCord; import net.md_5.bungee.EntityMap; import net.md_5.bungee.UserConnection; @@ -81,6 +82,8 @@ public class UpstreamBridge extends PacketHandler @Override public void handle(Chat chat) throws Exception { + Preconditions.checkArgument( chat.getMessage().length() < 100, "Chat message too long" ); // Mojang limit, check on updates + ChatEvent chatEvent = new ChatEvent( con, con.getServer(), chat.getMessage() ); if ( !bungee.getPluginManager().callEvent( chatEvent ).isCancelled() ) {