Learn R Programming

virustotal (version 0.5.0)

sanitize_file_path: Sanitize file path input

Description

Validates and sanitizes file paths to prevent directory traversal attacks and ensure safe file operations.

Usage

sanitize_file_path(file_path, allow_relative = FALSE)

Value

Sanitized file path or throws error if invalid

Arguments

file_path

Character string representing a file path

allow_relative

Logical. Whether to allow relative paths (default: FALSE)

See Also

Other security: is_api_key_configured(), sanitize_domain(), sanitize_hash(), sanitize_ip(), sanitize_url(), security-utilities