fortplot_security_core Module



Functions

public function check_path_exists(path) result(exists)

Check if a file or directory exists

Arguments

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

Return Value logical

public function sanitize_filename(filename) result(safe_filename)

Sanitize filename by removing dangerous characters

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 from injection attacks

Arguments

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

Return Value logical

public function get_test_output_path(relative_path) result(full_path)

Get safe test output path

Arguments

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

Return Value character(len=MAX_PATH_LENGTH)


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

Arguments

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