mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
20 lines
1.3 KiB
Diff
20 lines
1.3 KiB
Diff
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 fa5c640239451579fba35ad7b0979739e0b7b16f..e78306cb187b5f08e32888ebd55c4c486fc8dad2 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -2541,7 +2541,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
String[] lines = new String[4];
|
|
|
|
for (int i = 0; i < astring.length; ++i) {
|
|
- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a(astring[i])).getString());
|
|
+ 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);
|