validation

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxInputSize   = 10 * 1024 * 1024 // 10MB
	MaxCommandArgs = 1000
	MaxPathLength  = 4096
	MaxConfigSize  = 1 * 1024 * 1024 // 1MB
)

Variables

This section is empty.

Functions

func SanitizePath

func SanitizePath(path string) (string, error)

SanitizePath prevents path traversal attacks

func ValidateCommandArgs

func ValidateCommandArgs(args []string) error

ValidateCommandArgs checks command argument limits

func ValidateConfigPath

func ValidateConfigPath(path string) error

ValidateConfigPath ensures config paths are safe

func ValidateInputSize

func ValidateInputSize(input string) error

ValidateInputSize checks input size limits

Types

This section is empty.

Jump to

Keyboard shortcuts

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