diff --git a/patches/server/0047-Fix-component-extra-empty-array-exploit.patch b/patches/server/0047-Fix-component-extra-empty-array-exploit.patch new file mode 100644 index 0000000..93847e1 --- /dev/null +++ b/patches/server/0047-Fix-component-extra-empty-array-exploit.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Luna +Date: Mon, 29 May 2023 19:34:50 -0300 +Subject: [PATCH] Fix component extra empty array exploit + + +diff --git a/src/main/java/net/minecraft/network/chat/Component.java b/src/main/java/net/minecraft/network/chat/Component.java +index 534f1e6092d2b64b6e6e3182eac0cc38718ab2f8..7fcab29427ea030c0d9dcb6ce237b67d98420b55 100644 +--- a/src/main/java/net/minecraft/network/chat/Component.java ++++ b/src/main/java/net/minecraft/network/chat/Component.java +@@ -322,6 +322,11 @@ public interface Component extends Message, FormattedText, Iterable { + if (!jsonelement.isJsonObject()) { + if (jsonelement.isJsonArray()) { + JsonArray jsonarray = jsonelement.getAsJsonArray(); ++ // Scissors start ++ if (jsonarray.size() <= 0) { ++ throw new JsonParseException("Unexpected empty array of components"); ++ } ++ // Scissors end + + ichatmutablecomponent = null; + Iterator iterator = jsonarray.iterator();