From 28da2b9afbf27ca905e38488aa8f6b95e5b5157f Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 18 Jun 2020 13:19:04 +0200 Subject: [PATCH] Ent 5473 report template inventory --- .../godmode/reporting/reporting_builder.list_items.php | 2 +- pandora_console/include/functions_reporting.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php index af9bf7b5f2..ff4c46abf8 100755 --- a/pandora_console/godmode/reporting/reporting_builder.list_items.php +++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php @@ -471,7 +471,7 @@ foreach ($items as $item) { if ($is_inventory_item) { $external_source = json_decode($item['external_source'], true); $agents = $external_source['id_agents']; - $modules = $external_source['inventory_modules']; + $modules = io_safe_output($external_source['inventory_modules']); $agent_name_db = []; foreach ($agents as $a) { diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 7869e8f6e7..a71214396c 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -160,7 +160,7 @@ function reporting_make_reporting_data( $return = []; if (!empty($report)) { - $contents = $report['contents']; + $contents = io_safe_output($report['contents']); } else { $report = io_safe_output(db_get_row('treport', 'id_report', $id_report)); $contents = io_safe_output( @@ -2236,7 +2236,7 @@ function reporting_inventory($report, $content, $type) $es = json_decode($content['external_source'], true); $id_agent = $es['id_agents']; - $module_name = $es['inventory_modules']; + $module_name = io_safe_input($es['inventory_modules']); if (empty($module_name)) { $module_name = [0 => 0]; }