From a6d057b1134b61b365b8d23958e4de34f0f0ed41 Mon Sep 17 00:00:00 2001 From: 0x22 <0x22@futureclient.net> Date: Thu, 26 Apr 2018 04:51:54 -0400 Subject: [PATCH] Fix exploit that allowed colored signs to be created (#1098) --- ...-allowed-colored-signs-to-be-created.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch diff --git a/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch new file mode 100644 index 000000000..0d827fa97 --- /dev/null +++ b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: 0x22 <0x22@futureclient.net> +Date: Thu, 26 Apr 2018 04:41:11 -0400 +Subject: [PATCH] Fix exploit that allowed colored signs to be created + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index e6d0c636..a5faa6a0 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + String[] lines = new String[4]; + + for (int i = 0; i < astring.length; ++i) { +- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a(astring[i])).toPlainText()); ++ lines[i] = SharedConstants.a(astring[i]); //Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. + } + SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); + this.server.getPluginManager().callEvent(event); +-- \ No newline at end of file