13
0
geforkt von Mirrors/Paper

Updated Upstream (Bukkit/CraftBukkit) (#8378)

Dieser Commit ist enthalten in:
Shane Freeder 2022-09-23 06:08:43 +01:00
Ursprung ca48b2617b
Commit eb3f66c6da
7 geänderte Dateien mit 69 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -33,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
api("com.google.code.gson:gson:2.8.9")
- api("net.md-5:bungeecord-chat:1.16-R0.4")
+ api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.6") // Paper
api("org.yaml:snakeyaml:1.30")
api("org.yaml:snakeyaml:1.32")
// Paper start
api("com.googlecode.json-simple:json-simple:1.1.1") {
isTransitive = false // includes junit

Datei anzeigen

@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ dependencies {
api("com.google.code.gson:gson:2.8.9")
api("net.md-5:bungeecord-chat:1.16-R0.4")
api("org.yaml:snakeyaml:1.30")
api("org.yaml:snakeyaml:1.32")
+ // Paper start
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
+ isTransitive = false // includes junit

Datei anzeigen

@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ api("com.google.guava:guava:31.0.1-jre")
+ api("com.google.code.gson:gson:2.8.9")
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
+ api("org.yaml:snakeyaml:1.30")
+ api("org.yaml:snakeyaml:1.32")
+
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
@ -175,7 +175,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- <version>1.30</version>
- <version>1.32</version>
- <scope>compile</scope>
- </dependency>
- <!-- not part of the API proper -->

Datei anzeigen

@ -0,0 +1,61 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 22 Sep 2022 07:04:30 +0100
Subject: [PATCH] Expose codepoint limit in YamlConfigOptions, and increase
default
diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
+++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
@@ -0,0 +0,0 @@ public class YamlConfiguration extends FileConfiguration {
public void loadFromString(@NotNull String contents) throws InvalidConfigurationException {
Preconditions.checkArgument(contents != null, "Contents cannot be null");
yamlLoaderOptions.setProcessComments(options().parseComments());
+ yamlLoaderOptions.setCodePointLimit(options().codePointLimit()); // Paper
MappingNode node;
try (Reader reader = new UnicodeReader(new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)))) {
diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java b/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java
+++ b/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
public class YamlConfigurationOptions extends FileConfigurationOptions {
private int indent = 2;
private int width = 80;
+ private int codePointLimit = 64 * 1024 * 1024; // 64 MB // Paper
protected YamlConfigurationOptions(@NotNull YamlConfiguration configuration) {
super(configuration);
@@ -0,0 +0,0 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
this.width = value;
return this;
}
+
+ // Paper start
+ /**
+ * Gets the maximum code point limit, that being, the maximum length of the document
+ * in which the loader will read
+ *
+ * @return The current value
+ */
+ public int codePointLimit() {
+ return codePointLimit;
+ }
+
+ /**
+ * Sets the maximum code point limit, that being, the maximum length of the document
+ * in which the loader will read
+ *
+ * @param codePointLimit new codepoint limit
+ * @return This object, for chaining
+ */
+ @NotNull
+ public YamlConfigurationOptions codePointLimit(int codePointLimit) {
+ this.codePointLimit = codePointLimit;
+ return this;
+ }
+ // Paper end
}

Datei anzeigen

@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'.");
return;
}
- if (javaVersion > 62.0) {
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 18 is supported.");
- if (javaVersion > 63.0) {
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 19 is supported.");
- return;
- }

@ -1 +1 @@
Subproject commit 9ae3f10f8fa50a825af823131c468c36da3be880
Subproject commit acdb55f9a97c6b361947405717eb710b0200e165

@ -1 +1 @@
Subproject commit dc57aa358022f2c611f261a5e0cd6e8aef24bf78
Subproject commit 08cdd26ca9c8fbae22ffa03f79ecc564f015e260