Add config option to allow symbolic links for files.

This commit is contained in:
Wizjany
2012-12-25 18:08:03 -05:00
parent a7b4913f6c
commit a54c7437fc
4 changed files with 9 additions and 2 deletions

View File

@ -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");
}