mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Add worldedit runtime environment to increase yaml alias limit (#2395)
This can be set by -Dworldedit.yaml.aliasLimit=XXX in the startup parameter (cherry picked from commit 94565356fd39bf360b35ee77ea5b3614d48be772)
This commit is contained in:
parent
0744504fad
commit
81ba7d1acd
@ -98,6 +98,8 @@ public class YAMLProcessor extends YAMLNode {
|
|||||||
|
|
||||||
LoaderOptions loaderOptions = new LoaderOptions();
|
LoaderOptions loaderOptions = new LoaderOptions();
|
||||||
try {
|
try {
|
||||||
|
int yamlAliasLimit = Integer.getInteger("worldedit.yaml.aliasLimit", 50);
|
||||||
|
loaderOptions.setMaxAliasesForCollections(yamlAliasLimit);
|
||||||
// 64 MB default
|
// 64 MB default
|
||||||
int yamlCodePointLimit = Integer.getInteger("worldedit.yaml.codePointLimit", 64 * 1024 * 1024);
|
int yamlCodePointLimit = Integer.getInteger("worldedit.yaml.codePointLimit", 64 * 1024 * 1024);
|
||||||
loaderOptions.setCodePointLimit(yamlCodePointLimit);
|
loaderOptions.setCodePointLimit(yamlCodePointLimit);
|
||||||
@ -105,7 +107,7 @@ public class YAMLProcessor extends YAMLNode {
|
|||||||
// pre-1.32 snakeyaml
|
// pre-1.32 snakeyaml
|
||||||
}
|
}
|
||||||
|
|
||||||
yaml = new Yaml(new SafeConstructor(new LoaderOptions()), representer, dumperOptions, loaderOptions);
|
yaml = new Yaml(new SafeConstructor(loaderOptions), representer, dumperOptions, loaderOptions);
|
||||||
|
|
||||||
this.file = file;
|
this.file = file;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user