archive

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRelative

func CheckRelative(dir, filename string) (string, error)

CheckRelative returns an error if the filename path escapes dir. This is used to protect against path traversal attacks when extracting archives. It also rejects absolute filename paths.

func CheckSymlink(dir, name, linkname string) error

CheckSymlink returns an error if the link path escapes dir. This is used to protect against path traversal attacks when extracting archives. It also rejects absolute linkname paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL