Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SafePath ¶
SafePath validates that joining destPath with filename results in a path within destPath, preventing path traversal attacks from malicious tar entries.
func ValidateFilePath ¶
ValidateFilePath cleans a file path and rejects relative ".." traversal. It does NOT sandbox absolute paths: an input like "/a/b/../../etc/passwd" cleans to "/etc/passwd" and is accepted. Callers needing confinement to a specific directory should use SafePath instead.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.