Paper/patches/server/0193-Fix-exploit-that-allowed-colored-signs-to-be-created.patch
2022-02-28 22:52:35 -07:00

23 Zeilen
1.5 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/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fe414f1f84407574f6cae4f83c9e30caa7b16e33..9854706d1645a5c04e7ba636cf6f139b1ac4c453 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2810,9 +2810,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
TextFilter.FilteredText currentLine = signText.get(i);
if (this.player.isTextFilteringEnabled()) {
- lines.add(net.kyori.adventure.text.Component.text(currentLine.getFiltered()));
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(currentLine.getFiltered())));
} else {
- lines.add(net.kyori.adventure.text.Component.text(currentLine.getRaw()));
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(currentLine.getRaw())));
}
}
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);