Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
fix staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Jun 18, 2021
1 parent 700768f commit 6634637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ func childrenOnly(inLink Link) error {
}
//disallow symlinks from climbing out of the target root
if strings.HasPrefix(rel, "..") {
return fmt.Errorf("Symlink target %q escapes root %q", inLink.Target, inLink.Root)
return fmt.Errorf("symlink target %q escapes root %q", inLink.Target, inLink.Root)
}
//disallow pointing to your own root from above as well
if strings.HasPrefix(resolvedTarget, inLink.Root) {
return fmt.Errorf("Symlink target %q escapes and re-enters its own root %q (forbidden)", inLink.Target, inLink.Root)
return fmt.Errorf("symlink target %q escapes and re-enters its own root %q (forbidden)", inLink.Target, inLink.Root)
}

return nil
Expand Down

0 comments on commit 6634637

Please sign in to comment.