소스 검색

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" {