mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-02 17:01:38 +01:00
23 lines
1.6 KiB
Diff
23 lines
1.6 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 e6c44e29e6b5bbb49c486685077cb5b1bff24f84..e29fffb8f91b52f0da77303c61c0e4fbef13370c 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -3142,9 +3142,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
FilteredText filteredtext = (FilteredText) signText.get(i);
|
|
|
|
if (this.player.isTextFilteringEnabled()) {
|
|
- lines.add(net.kyori.adventure.text.Component.text(filteredtext.filteredOrEmpty())); // Paper - adventure
|
|
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(filteredtext.filteredOrEmpty()))); // Paper - adventure
|
|
} else {
|
|
- 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
|
|
}
|
|
}
|
|
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);
|