Skip to main content

validate_path_within

Function validate_path_within 

Source
pub fn validate_path_within(
    base: &Path,
    target: &Path,
    context: &str,
) -> Result<PathBuf>
Expand description

Validate that a file path stays within a given base directory (no path traversal). Returns the canonicalized path on success.