archive: do not call FollowSymlinkInScope in createTarFile
Signed-off-by: Tibor Vass <teabee89@gmail.com>
This commit is contained in:
parent
78bd3c0356
commit
bdff6d8011
3 changed files with 23 additions and 10 deletions
|
@ -10,8 +10,6 @@ import (
|
|||
|
||||
const maxLoopCounter = 100
|
||||
|
||||
type ErrBreakout error
|
||||
|
||||
// FollowSymlink will follow an existing link and scope it to the root
|
||||
// path provided.
|
||||
// The role of this function is to return an absolute path in the root
|
||||
|
@ -36,7 +34,7 @@ func FollowSymlinkInScope(link, root string) (string, error) {
|
|||
}
|
||||
|
||||
if !strings.HasPrefix(filepath.Dir(link), root) {
|
||||
return "", ErrBreakout(fmt.Errorf("%s is not within %s", link, root))
|
||||
return "", fmt.Errorf("%s is not within %s", link, root)
|
||||
}
|
||||
|
||||
prev := "/"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue