2021-06-12 21:30:37 +02:00
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/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
2022-08-01 21:56:28 +02:00
index da09a756a0e0489ac6dc0262ac01e3b0c36e4caf..f7398719a3acb564f6c20d864293361053d5de92 100644
2021-06-12 21:30:37 +02:00
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
2022-08-01 21:56:28 +02:00
@@ -3231,9 +3231,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
2022-07-27 21:49:24 +02:00
FilteredText filteredtext = (FilteredText) signText.get(i);
2021-06-12 21:30:37 +02:00
if (this.player.isTextFilteringEnabled()) {
2022-07-27 21:49:24 +02:00
- lines.add(net.kyori.adventure.text.Component.text(filteredtext.filteredOrEmpty())); // Paper - adventure
2022-07-27 23:19:52 +02:00
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(filteredtext.filteredOrEmpty()))); // Paper - adventure
2021-06-12 21:30:37 +02:00
} else {
2022-07-27 21:49:24 +02:00
- lines.add(net.kyori.adventure.text.Component.text(filteredtext.raw())); // Paper - adventure
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(filteredtext.raw()))); // Paper - adventure
2021-06-12 21:30:37 +02:00
}
}
2021-06-20 21:25:59 +02:00
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);