瀏覽代碼

Fixing the previous bug

Toby Chui 3 年之前
父節點
當前提交
5663c0835f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mod/user/directoryHandler.go

+ 1 - 1
mod/user/directoryHandler.go

@@ -107,7 +107,7 @@ func (u *User) VirtualPathToRealPath(vpath string) (string, error) {
 
 			//A bit hacky to make sure subpath contains no traversal
 			//Will migrate this to File System Vpath Resolver in the next large update
-			subpath = strings.ReplaceAll(subpath, "..", "")
+			subpath = strings.ReplaceAll(subpath, "../", "")
 
 			//Handle general cases
 			if storage.Hierarchy == "user" {