Set base to root
This commit is contained in:
parent
53960d48c7
commit
fec0663bb7
|
@ -423,6 +423,7 @@ func resolveSymlinksImpl(root, base, rel string, followCount uint) (string, erro
|
|||
path := filepath.Join(base, name)
|
||||
if !strings.HasPrefix(path, root) {
|
||||
// One cannot '..' their way out of root.
|
||||
base = root
|
||||
continue
|
||||
}
|
||||
fi, err := os.Lstat(path)
|
||||
|
|
Loading…
Reference in New Issue