mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
e3f2448ae1
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 60268ac8 Recipe choice lists should be copied once handed over to Bukkit 7ab335f2 Consistent multiple choice APIs for RecipeChoice. 2b6f3d7f SPIGOT-4586: Change PotionEffectType#value to not include null CraftBukkit Changes:2aba349f
Need to update item in hand if fish bucket pickup cancelledb634e059
SPIGOT-4591: Must mark itemstacks as dirty in case the handle itself changed1748af89
Consistent multiple choice APIs for RecipeChoice.
23 lines
1.2 KiB
Diff
23 lines
1.2 KiB
Diff
From e5e2fc8ea552a3cadcf505ec83832845d8b3f7b7 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 59b0084c7b..f4b5627d46 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -2479,7 +2479,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
|
String[] lines = new String[4];
|
|
|
|
for (int i = 0; i < astring.length; ++i) {
|
|
- lines[i] = EnumChatFormat.b(new ChatComponentText(EnumChatFormat.b(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);
|
|
--
|
|
2.20.1
|
|
|