2018-10-05 05:18:46 +02:00
From 7ecdd7ff4e17135f5184695dcde3abb7017b6ea7 Mon Sep 17 00:00:00 2001
2018-04-26 10:51:54 +02: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-10-02 07:54:45 +02:00
index d44ac990b4..da32ed7a01 100644
2018-04-26 10:51:54 +02:00
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
2018-10-02 07:54:45 +02:00
@@ -2495,7 +2495,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
2018-04-26 10:51:54 +02:00
String[] lines = new String[4];
for (int i = 0; i < astring.length; ++i) {
2018-07-18 20:55:52 +02:00
- lines[i] = EnumChatFormat.b(new ChatComponentText(EnumChatFormat.b(astring[i])).getString());
2018-04-26 10:51:54 +02: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-09-27 04:35:42 +02:00
2.19.0
2018-04-26 10:51:54 +02:00