fortplot_security Module



Functions

public function safe_check_program_available(program_name) result(available)

Safely check if external program is available

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: program_name

Return Value logical

public function safe_validate_mpeg_with_ffprobe(filename) result(valid)

Safely validate MPEG files without shell injection

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

Return Value logical

public function sanitize_filename(filename) result(safe_filename)

Sanitize filename for safe file operations

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

Return Value character(len=len)

public function is_safe_path(path) result(safe)

Check if path is safe (no shell injection attempts)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path

Return Value logical

public function is_imagemagick_environment_enabled() result(enabled)

Check if ImageMagick environment is enabled

Arguments

None

Return Value logical

public function get_test_output_path(relative_path) result(full_path)

Get cross-platform test output path with automatic directory creation

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: relative_path

Return Value character(len=512)


Subroutines

public subroutine safe_create_directory(dir_path, success)

Safely create directory without shell injection

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: dir_path
logical, intent(out) :: success

public subroutine safe_remove_file(filename, success)

Safely remove file without shell injection

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
logical, intent(out) :: success

public subroutine safe_launch_viewer(filename, success)

Safely launch file viewer without shell injection

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
logical, intent(out) :: success