From 8b8b5c991b045f8b721e2c45356797b29810ee89 Mon Sep 17 00:00:00 2001 From: Johannes Helmold Date: Wed, 29 Jan 2025 16:40:55 +0100 Subject: [PATCH 1/2] Fix: Made Verinice reports include attached reports. It was not possible to export a "Verinice ISM" or "Verinice ISM all results" report using a report config with attached report formats. That is working now. --- src/manage_sql_report_formats.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/manage_sql_report_formats.c b/src/manage_sql_report_formats.c index 0a1b49b39..99abeba32 100644 --- a/src/manage_sql_report_formats.c +++ b/src/manage_sql_report_formats.c @@ -4003,6 +4003,13 @@ apply_report_format (gchar *report_format_id, report_format, REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST); + if (!rf_dependencies_string || !strcmp (rf_dependencies_string, "")) + rf_dependencies_string + = sql_string ("SELECT value" + " FROM report_config_params" + " WHERE report_config = %llu AND name = 'Attached report formats'", + report_config); + if (rf_dependencies_string) { gchar **rf_dependencies, **current_rf_dependency; From f264f5dd8551e7ad71b69359f7cdd1451597c518 Mon Sep 17 00:00:00 2001 From: Johannes Helmold Date: Thu, 30 Jan 2025 10:05:16 +0100 Subject: [PATCH 2/2] Switched the prioritization for loading the attached report formats. --- src/manage_sql_report_formats.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/manage_sql_report_formats.c b/src/manage_sql_report_formats.c index 99abeba32..2c7c9d1ae 100644 --- a/src/manage_sql_report_formats.c +++ b/src/manage_sql_report_formats.c @@ -3997,18 +3997,18 @@ apply_report_format (gchar *report_format_id, rf_dependencies_string = sql_string ("SELECT value" - " FROM report_format_params" - " WHERE report_format = %llu" - " AND type = %i", - report_format, - REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST); + " FROM report_config_params" + " WHERE report_config = %llu AND name = 'Attached report formats'", + report_config); if (!rf_dependencies_string || !strcmp (rf_dependencies_string, "")) rf_dependencies_string = sql_string ("SELECT value" - " FROM report_config_params" - " WHERE report_config = %llu AND name = 'Attached report formats'", - report_config); + " FROM report_format_params" + " WHERE report_format = %llu" + " AND type = %i", + report_format, + REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST); if (rf_dependencies_string) {