Skip to content

Commit 5e6412d

Browse files
committed
Fix deb.go symlink validation
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent 0b91990 commit 5e6412d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/archive/deb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func ExtractDeb(ctx context.Context, d, f string) error {
8888
if err != nil {
8989
return fmt.Errorf("failed to evaluate symlink: %w", err)
9090
}
91-
if !IsValidPath(target, d) {
91+
if !IsValidPath(linkReal, d) {
9292
return fmt.Errorf("symlink points outside temporary directory: %s", linkReal)
9393
}
9494
if err := os.Symlink(header.Linkname, target); err != nil {

0 commit comments

Comments
 (0)