浏览代码

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

Leonardo Jeanteur 2 周之前
父节点
当前提交
d4298e814e
共有 1 个文件被更改,包括 2 次插入0 次删除
  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;