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