geforkt von Mirrors/Paper
b922ff9886
This only impacted people who used our useSnapshots new API in a plugin, which obviously was no one as the data result was completely broken. Merged the NPE check patch into mine since it has to handle it too.
23 Zeilen
1.2 KiB
Diff
23 Zeilen
1.2 KiB
Diff
From 133271df1c5d0f9cccc880a70d733a173459c68c 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 e6d0c6366..a5faa6a0a 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -2220,7 +2220,7 @@ 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);
|
|
--
|
|
2.18.0
|
|
|