pub fn validate_path_security(path: &Path, check_symlinks: bool) -> Result<()>Expand description
Validates a path for security constraints
Checks if the path:
- Is not blacklisted
- Does not contain symlinks (if
check_symlinksis true)
§Arguments
path- The path to validate (should be the original path before canonicalization)check_symlinks- Whether to check for symlinks in the path
§Returns
Ok(())if the path is safeErrwith a descriptive error message if the path fails validation