Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
Add config option to allow symbolic links for files.
Dieser Commit ist enthalten in:
Ursprung
a7b4913f6c
Commit
a54c7437fc
@ -107,6 +107,7 @@ public abstract class LocalConfiguration {
|
||||
public int butcherDefaultRadius = -1;
|
||||
public int butcherMaxRadius = -1;
|
||||
public boolean allowExtraDataValues = false;
|
||||
public boolean allowSymlinks = false;
|
||||
|
||||
/**
|
||||
* Loads the configuration.
|
||||
|
@ -825,7 +825,7 @@ public class WorldEdit {
|
||||
String filePath = f.getCanonicalPath();
|
||||
String dirPath = dir.getCanonicalPath();
|
||||
|
||||
if (!filePath.substring(0, dirPath.length()).equals(dirPath)) {
|
||||
if (!filePath.substring(0, dirPath.length()).equals(dirPath) && !config.allowSymlinks) {
|
||||
throw new FilenameResolutionException(filename,
|
||||
"Path is outside allowable root");
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ public class YAMLConfiguration extends LocalConfiguration {
|
||||
|
||||
saveDir = config.getString("saving.dir", saveDir);
|
||||
|
||||
allowSymlinks = config.getBoolean("files.allow-symbolic-links", false);
|
||||
|
||||
disallowedBlocks = new HashSet<Integer>(config.getIntList("limits.disallowed-blocks", null));
|
||||
|
||||
allowedDataCycleBlocks = new HashSet<Integer>(config.getIntList("limits.allowed-data-cycle-blocks", null));
|
||||
|
@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
limits:
|
||||
allow-extra-data-values: false
|
||||
max-blocks-changed:
|
||||
default: -1
|
||||
maximum: -1
|
||||
@ -56,10 +57,13 @@ scripting:
|
||||
saving:
|
||||
dir: schematics
|
||||
|
||||
files:
|
||||
allow-symbolic-links: false
|
||||
|
||||
history:
|
||||
size: 15
|
||||
expiration: 10
|
||||
|
||||
|
||||
wand-item: 271
|
||||
shell-save-type:
|
||||
no-double-slash: false
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren