2023-06-08 11:18:51 +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
2023-06-08 15:25:35 +02:00
diff --git a/build.gradle.kts b/build.gradle.kts
index 967b675eb600282b881d966f95c9d3cde3edc4e8..97f1a5bafdd1f520fee5f31fda87b4c251aea33f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -38,7 +38,7 @@ dependencies {
implementation("io.netty:netty-all:4.1.87.Final"); // Paper - Bump netty
}
-val craftbukkitPackageVersion = "1_19_R3" // Paper
+val craftbukkitPackageVersion = "1_20_R1" // Paper
tasks.jar {
archiveClassifier.set("dev")
2023-06-08 11:18:51 +02:00
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
2023-06-08 15:25:35 +02:00
index a778d53bba0f9678a47ce6c3d94449ae7cd1c527..41861cb1e303213b2963e90fac6b4cbbfbbe36f7 100644
2023-06-08 11:18:51 +02:00
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
2023-06-08 15:25:35 +02:00
@@ -203,9 +203,9 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
Style chatmodifier = signtext.getMessage(i, entityhuman.isTextFilteringEnabled()).getStyle();
2023-06-08 11:18:51 +02:00
2023-06-08 15:25:35 +02:00
if (entityhuman.isTextFilteringEnabled()) {
- signtext = signtext.setMessage(i, Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
+ signtext = signtext.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only
2023-06-08 11:18:51 +02:00
} else {
2023-06-08 15:25:35 +02:00
- signtext = signtext.setMessage(i, Component.literal(filteredtext.raw()).setStyle(chatmodifier), Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
+ signtext = signtext.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.raw())).setStyle(chatmodifier), Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only
2023-06-08 11:18:51 +02:00
}
2023-06-08 15:25:35 +02:00
}
2023-06-08 11:18:51 +02:00