From f73b5cbdb3870c5f35d781a7df9239b7fdec3c90 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 24 Sep 2024 07:47:30 +1000 Subject: [PATCH] SPIGOT-7906: Increase YAML nesting limit to 100 By: blablubbabc --- .../java/org/bukkit/configuration/file/YamlConfiguration.java | 1 + 1 file changed, 1 insertion(+) diff --git a/paper-api/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/paper-api/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java index a090ef390d..9ae41b2bd4 100644 --- a/paper-api/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java +++ b/paper-api/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java @@ -61,6 +61,7 @@ public class YamlConfiguration extends FileConfiguration { yamlLoaderOptions = new LoaderOptions(); yamlLoaderOptions.setMaxAliasesForCollections(Integer.MAX_VALUE); // SPIGOT-5881: Not ideal, but was default pre SnakeYAML 1.26 yamlLoaderOptions.setCodePointLimit(Integer.MAX_VALUE); // SPIGOT-7161: Not ideal, but was default pre SnakeYAML 1.32 + yamlLoaderOptions.setNestingDepthLimit(100); // SPIGOT-7906: The default limit (50) can be easily reached with nested bundles constructor = new YamlConstructor(yamlLoaderOptions); representer = new YamlRepresenter(yamlDumperOptions);