validate_file_path

Function validate_file_path 

Source
pub fn validate_file_path(
    file_path: &str,
) -> Result<PathBuf, (StatusCode, Json<ErrorResponse>)>
Expand description

Validates and sanitizes a file path to prevent path traversal attacks Returns the canonicalized path if valid, or an error if the path is unsafe This function is kept available for potential future web endpoints that need file path validation