PaperMC/CraftBukkit-Patches/0113-Cap-window-names-to-prevent-client-disconnects.patch

22 lines
921 B
Diff
Raw Normal View History

2014-04-24 08:27:12 +02:00
From 64124b6baf4bb7a6bb9d12cdc2d8a939df5f5b3e Mon Sep 17 00:00:00 2001
2014-04-12 06:18:37 +02:00
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Sun, 23 Mar 2014 10:53:48 +0000
Subject: [PATCH] Cap window names to prevent client disconnects
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutOpenWindow.java b/src/main/java/net/minecraft/server/PacketPlayOutOpenWindow.java
index f6d7b2b..860592d 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutOpenWindow.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutOpenWindow.java
@@ -14,6 +14,7 @@ public class PacketPlayOutOpenWindow extends Packet {
public PacketPlayOutOpenWindow() {}
public PacketPlayOutOpenWindow(int i, int j, String s, int k, boolean flag) {
+ if (s.length() > 32) s = s.substring( 0, 32 ); // Spigot - Cap window name to prevent client disconnects
this.a = i;
this.b = j;
this.c = s;
--
2014-04-19 01:15:23 +02:00
1.9.1
2014-04-12 06:18:37 +02:00