Skip to content

Commit e608ed0

Browse files
committed
use filesystem seperator
1 parent 8009978 commit e608ed0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helper/chroot/chroot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func isCrossBoundaries(path string) bool {
3737
path = filepath.ToSlash(path)
3838
path = filepath.Clean(path)
3939

40-
return strings.HasPrefix(path, "../") || strings.HasPrefix(path, "..\\")
40+
return strings.HasPrefix(path, ".."+string(filepath.Separator))
4141
}
4242

4343
func (fs *ChrootHelper) Create(filename string) (billy.File, error) {

0 commit comments

Comments
 (0)