2021-06-12 19:30:37 +00: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-03-16 15:57:51 +00:00
index 586692eff023d9e6bb9c6ecaa051bd0c90ab0e37..4c428351426177f647c483f6178512fe4fad42fa 100644
2021-06-12 19:30:37 +00:00
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
2022-03-16 15:57:51 +00:00
@@ -2811,9 +2811,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
2021-11-17 05:00:14 +00:00
TextFilter.FilteredText currentLine = signText.get(i);
2021-06-12 19:30:37 +00:00
if (this.player.isTextFilteringEnabled()) {
2021-11-17 05:00:14 +00:00
- lines.add(net.kyori.adventure.text.Component.text(currentLine.getFiltered()));
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(currentLine.getFiltered())));
2021-06-12 19:30:37 +00:00
} else {
2021-11-17 05:00:14 +00:00
- lines.add(net.kyori.adventure.text.Component.text(currentLine.getRaw()));
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(currentLine.getRaw())));
2021-06-12 19:30:37 +00:00
}
}
2021-06-20 19:25:59 +00:00
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);