2018-08-29 11:16:31 +08:00
From afb4e25e1128b93702f63d86e60ca4fa6be40b7b Mon Sep 17 00:00:00 2001
2018-04-26 16:51:54 +08:00
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
2018-08-29 11:16:31 +08:00
index b296f948ef..f735d97be2 100644
2018-04-26 16:51:54 +08:00
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
2018-08-29 11:16:31 +08:00
@@ -2520,7 +2520,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
2018-04-26 16:51:54 +08:00
String[] lines = new String[4];
for (int i = 0; i < astring.length; ++i) {
2018-07-19 02:55:52 +08:00
- lines[i] = EnumChatFormat.b(new ChatComponentText(EnumChatFormat.b(astring[i])).getString());
2018-04-26 16:51:54 +08:00
+ 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);
--
2018-07-19 02:55:52 +08:00
2.18.0
2018-04-26 16:51:54 +08:00