Documentation
¶
Overview ¶
Package pathutil provides path security middleware Per AI.md PART 5: HTTP Request Path Middleware (NON-NEGOTIABLE)
Package pathutil provides path security and normalization functions Per AI.md PART 5: Path Security Functions (NON-NEGOTIABLE)
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func PathSecurityMiddleware ¶
PathSecurityMiddleware normalizes paths and blocks traversal attempts Per AI.md: This middleware MUST be first in the chain - before auth, before routing.
func SafeFilePath ¶
SafeFilePath validates a file path with extension Allows dots in filename portion for extensions (e.g., "file.txt")
func SafeFilePathWithBase ¶
SafeFilePathWithBase ensures path stays within base directory Per AI.md PART 5: When constructing file paths from user input, ALWAYS validate
Types ¶
This section is empty.