pathutil

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathTraversal = errors.New("path traversal not allowed")
	ErrNotAbsolute   = errors.New("absolute path required")
	ErrNullByte      = errors.New("path contains null byte")
)

Functions

func ValidatePath

func ValidatePath(path string) error

ValidatePath checks that a path is absolute and does not escape the filesystem root. It rejects path traversal attempts, null bytes, and relative paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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