2019-12-16 02:58:10 +00:00
From 525e9a5b2ced642a9fa7fd1ad5e1f5e3b12ea495 Mon Sep 17 00:00:00 2001
2018-04-26 08:51:54 +00: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
2019-12-16 02:58:10 +00:00
index ad2a366275..8757b6751e 100644
2018-04-26 08:51:54 +00:00
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
2019-12-11 23:43:22 +00:00
@@ -2501,7 +2501,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
2018-04-26 08:51:54 +00:00
String[] lines = new String[4];
for (int i = 0; i < astring.length; ++i) {
2018-07-18 18:55:52 +00:00
- lines[i] = EnumChatFormat.b(new ChatComponentText(EnumChatFormat.b(astring[i])).getString());
2018-04-26 08:51:54 +00: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);
--
2019-12-16 02:58:10 +00:00
2.24.1
2018-04-26 08:51:54 +00:00