Skip to main content

validate_path

Function validate_path 

Source
pub fn validate_path(root: &Path, requested: &str) -> Result<PathBuf>
Expand description

Validate that a path resolves within the allowed root directory. Prevents path traversal attacks (e.g., ../../etc/passwd).