Sfoglia il codice sorgente

LocalFileSystem.checkPath: Skip checking folders for paths with ..

Leonardo Jeanteur 1 settimana fa
parent
commit
d4298e814e
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      hxd/fs/LocalFileSystem.hx

+ 2 - 0
hxd/fs/LocalFileSystem.hx

@@ -375,6 +375,8 @@ class LocalFileSystem implements FileSystem {
 		return true;
 	}
 	function checkPath(path: String) {
+		if (StringTools.contains(path, "../"))
+			return checkPathLeaf(path);
 		var relPath = path.substr(baseDir.length);
 		var split = relPath.split("/");
 		var count = split.length;