From 515521cd003379ffa61e9e7ed0fe3e7b8688c983 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Thu, 12 Sep 2019 14:13:42 +0200 Subject: [PATCH 01/18] Fixed bug with API access list - #4622 --- pandora_console/include/functions_api.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 899add9ec0..25576c7b40 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -301,8 +301,13 @@ function isInACL($ip) // example lab.artica.es without '*' $name = []; $name = gethostbyname($acl_ip); - if (preg_match('/'.$name.'/', $ip)) { - return true; + if (preg_match('/'.$name.'/', $ip, $matches)) { + // This is for false matches, like '' or $. + if (count($matches) == 1 && $matches[0] == '') { + continue; + } else { + return true; + } } } } From 862d488d8db106e1039c0260469f3102d2153bc1 Mon Sep 17 00:00:00 2001 From: Kike Date: Mon, 14 Oct 2019 12:38:48 +0200 Subject: [PATCH 02/18] New util - update remote config files MD5 --- pandora_server/util/update_md5.py | 68 +++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 pandora_server/util/update_md5.py diff --git a/pandora_server/util/update_md5.py b/pandora_server/util/update_md5.py new file mode 100644 index 0000000000..0bb30ddd28 --- /dev/null +++ b/pandora_server/util/update_md5.py @@ -0,0 +1,68 @@ +#!/usr/bin/python +# Kevin Rojas 2018 + +import os +import glob +import hashlib +import argparse + + +def main(): + global args + global confdir + global md5dir + global agents + + # Argument parser + parser = argparse.ArgumentParser() + parser.add_argument('-r', '--run', required=False, dest='run', action='store_true', + help='run the tool to recreate md5 files') + parser.add_argument('-d', dest='dir', default='/var/spool/pandora/data_in', + help='data_in folder path (default /var/spool/pandora/data_in)') + parser.add_argument('-v', dest='verb', action='store_true', + help='verbose mode: Shows the files being updated') + + # Definitions + args = vars(parser.parse_args()) + datadir = args['dir'] + confdir = datadir + '/conf/' + md5dir = datadir + '/md5/' + agents = glob.glob(confdir + '*.conf') # Check folder for .conf files + + # Run script or show help + if len(args) > 0 and args['run']: + updatemd5() + else: + parser.print_help() + + +def md5sum(filename, blocksize=65536): + # Open files and calculate MD5 from its content + hash = hashlib.md5() + with open(filename, 'rb') as f: + for block in iter(lambda: f.read(blocksize), b''): + hash.update(block) + return hash.hexdigest() + + +def updatemd5(): + debug = args['verb'] + if not agents: + print(' ERROR: There are no .conf files at ' + + confdir + '. Please check the path provided.') + else: + count = 0 + for i in agents: + agentmd5 = md5dir + os.path.basename(os.path.splitext(i)[0]) + '.md5' + with open(agentmd5, 'w') as f: + f.write(md5sum(i)) + f.close() + count += 1 + + if debug: + print(os.path.basename(os.path.splitext(i)[0]) + '--> OK') + + print('Number of configuration files updated: ' + str(count)) + + +main() From 5676872f0a977a65261b72a3385e60552a864ef3 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Fri, 18 Oct 2019 15:44:05 +0200 Subject: [PATCH 03/18] Fixed macro agent address empty ip --- pandora_console/include/functions_events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 9563732c68..ff8fecadcb 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3553,7 +3553,7 @@ function events_get_response_target( $ip = db_get_value_filter('direccion', $agente_table_name, $filter); // If agent has not an IP, display N/A. - if ($ip === false) { + if ($ip === false || $ip === '') { $ip = __('N/A'); } From 898945d47f439f64c4434f5eac9d4de8a00d0688 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 29 Oct 2019 13:26:36 +0100 Subject: [PATCH 04/18] Added icon for gis maps connections in tabs of setup --- pandora_console/godmode/menu.php | 2 +- pandora_console/godmode/setup/gis.php | 11 +---------- pandora_console/godmode/setup/gis_step_2.php | 10 ++++++++-- pandora_console/godmode/setup/setup.php | 14 ++++++++++++++ 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 7175081912..f7e50863d3 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -317,7 +317,7 @@ if (check_acl($config['id_user'], 0, 'PM')) { $sub2['godmode/setup/setup&section=notifications']['refr'] = 0; if ($config['activate_gis']) { - $sub2['godmode/setup/gis']['text'] = __('Map conections GIS'); + $sub2['godmode/setup/setup&section=gis']['text'] = __('Map conections GIS'); } $sub['general']['sub2'] = $sub2; diff --git a/pandora_console/godmode/setup/gis.php b/pandora_console/godmode/setup/gis.php index 526abc0b0a..43e6ed71fd 100755 --- a/pandora_console/godmode/setup/gis.php +++ b/pandora_console/godmode/setup/gis.php @@ -28,15 +28,6 @@ require_once 'include/functions_gis.php'; ui_require_javascript_file('openlayers.pandora'); -// Header. -ui_print_page_header( - __('Map conections GIS'), - '', - false, - '', - true -); - $action = get_parameter('action'); switch ($action) { @@ -88,7 +79,7 @@ if ($mapsConnections !== false) { $table->data[] = [ ''.$mapsConnection['conection_name'].'', ui_print_group_icon($mapsConnection['group_id'], true), - ''.html_print_image('images/cross.png', true).'', ]; $table->cellclass[][2] = 'action_buttons'; diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index 133b4fdeaa..001baed40f 100644 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -26,6 +26,10 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user require_once 'include/functions_gis.php'; +$buttons['gis'] = [ + 'text' => ''.html_print_image('images/list.png', true, ['title' => __('GIS Maps connections')]).'', +]; + $action = get_parameter('action', 'create_connection_map'); if (is_ajax()) { @@ -41,7 +45,8 @@ switch ($action) { '', false, '', - true + true, + $buttons ); $mapConnection_name = ''; @@ -67,7 +72,8 @@ switch ($action) { '', false, '', - true + true, + $buttons ); $idConnectionMap = get_parameter('id_connection_map'); diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index a46d7bc832..48e6966c7b 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -133,6 +133,11 @@ $buttons['notifications'] = [ 'text' => ''.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'', ]; +$buttons['gis'] = [ + 'active' => false, + 'text' => ''.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'', +]; + $help_header = ''; if (enterprise_installed()) { $subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header); @@ -178,6 +183,11 @@ switch ($section) { $help_header = 'setup_integria_tab'; break; + case 'gis': + $buttons['gis']['active'] = true; + $subpage = ' » '.__('Map conections GIS'); + break; + case 'notifications': $buttons['notifications']['active'] = true; $subpage = ' » '.__('Notifications'); @@ -243,6 +253,10 @@ switch ($section) { include_once $config['homedir'].'/godmode/setup/setup_integria.php'; break; + case 'gis': + include_once $config['homedir'].'/godmode/setup/gis.php'; + break; + case 'notifications': include_once $config['homedir'].'/godmode/setup/setup_notifications.php'; break; From 7701ff7ad188c1c5624993acddd8f201dba3aeb7 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 8 Jan 2020 15:44:59 +0100 Subject: [PATCH 05/18] Resolve conflicts --- pandora_console/godmode/setup/setup.php | 245 +++++++++++------------- 1 file changed, 116 insertions(+), 129 deletions(-) diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index b93a38fb37..e9b8160fdd 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -133,149 +133,136 @@ $buttons['notifications'] = [ 'text' => ''.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'', ]; -$buttons['gis'] = [ - 'active' => false, - 'text' => ''.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'', - $buttons['websocket_engine'] = [ 'active' => false, 'text' => ''.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'', ]; - $help_header = ''; - if (enterprise_installed()) { - $subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header); +$help_header = ''; +if (enterprise_installed()) { + $subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header); +} + +switch ($section) { + case 'general': + $buttons['general']['active'] = true; + $subpage = ' » '.__('General'); + $help_header = 'setup_general_tab'; + break; + + case 'auth': + $buttons['auth']['active'] = true; + $subpage = ' » '.__('Authentication'); + break; + + case 'perf': + $buttons['perf']['active'] = true; + $subpage = ' » '.__('Performance'); + $help_header = ''; + break; + + case 'vis': + $buttons['vis']['active'] = true; + $subpage = ' » '.__('Visual styles'); + break; + + case 'net': + $buttons['net']['active'] = true; + $subpage = ' » '.__('Netflow'); + break; + + case 'ehorus': + $buttons['ehorus']['active'] = true; + $subpage = ' » '.__('eHorus'); + $help_header = 'setup_ehorus_tab'; + break; + + case 'integria': + $buttons['integria']['active'] = true; + $subpage = ' » '.__('Integria IMS'); + $help_header = 'setup_integria_tab'; + break; + + case 'notifications': + $buttons['notifications']['active'] = true; + $subpage = ' » '.__('Notifications'); + break; + + case 'websocket_engine': + $buttons['websocket_engine']['active'] = true; + $subpage = ' » '.__('Pandora Websocket Engine'); + $help_header = 'quickshell_settings'; + break; + + case 'enterprise': + $buttons['enterprise']['active'] = true; + $subpage = ' » '.__('Enterprise'); + $help_header = 'setup_enterprise_tab'; + break; + + default: + // Default. + break; +} + +// Header. +ui_print_page_header( + __('Configuration').$subpage, + '', + false, + $help_header, + true, + $buttons +); + +if (isset($config['error_config_update_config'])) { + if ($config['error_config_update_config']['correct'] == false) { + ui_print_error_message($config['error_config_update_config']['message']); + } else { + ui_print_success_message(__('Correct update the setup options')); } - switch ($section) { - case 'general': - $buttons['general']['active'] = true; - $subpage = ' » '.__('General'); - $help_header = 'setup_general_tab'; - break; + unset($config['error_config_update_config']); +} - case 'auth': - $buttons['auth']['active'] = true; - $subpage = ' » '.__('Authentication'); - break; +switch ($section) { + case 'general': + include_once $config['homedir'].'/godmode/setup/setup_general.php'; + break; - case 'perf': - $buttons['perf']['active'] = true; - $subpage = ' » '.__('Performance'); - $help_header = ''; - break; + case 'auth': + include_once $config['homedir'].'/godmode/setup/setup_auth.php'; + break; - case 'vis': - $buttons['vis']['active'] = true; - $subpage = ' » '.__('Visual styles'); - break; + case 'perf': + include_once $config['homedir'].'/godmode/setup/performance.php'; + break; - case 'net': - $buttons['net']['active'] = true; - $subpage = ' » '.__('Netflow'); - break; + case 'net': + include_once $config['homedir'].'/godmode/setup/setup_netflow.php'; + break; - case 'ehorus': - $buttons['ehorus']['active'] = true; - $subpage = ' » '.__('eHorus'); - $help_header = 'setup_ehorus_tab'; - break; + case 'vis': + include_once $config['homedir'].'/godmode/setup/setup_visuals.php'; + break; - case 'integria': - $buttons['integria']['active'] = true; - $subpage = ' » '.__('Integria IMS'); - $help_header = 'setup_integria_tab'; - break; + case 'ehorus': + include_once $config['homedir'].'/godmode/setup/setup_ehorus.php'; + break; - case 'gis': - $buttons['gis']['active'] = true; - $subpage = ' » '.__('Map conections GIS'); - break; + case 'integria': + include_once $config['homedir'].'/godmode/setup/setup_integria.php'; + break; - case 'notifications': - $buttons['notifications']['active'] = true; - $subpage = ' » '.__('Notifications'); - break; + case 'notifications': + include_once $config['homedir'].'/godmode/setup/setup_notifications.php'; + break; - case 'websocket_engine': - $buttons['websocket_engine']['active'] = true; - $subpage = ' » '.__('Pandora Websocket Engine'); - $help_header = 'quickshell_settings'; - break; + case 'websocket_engine': + include_once $config['homedir'].'/godmode/setup/setup_websocket_engine.php'; + break; - case 'enterprise': - $buttons['enterprise']['active'] = true; - $subpage = ' » '.__('Enterprise'); - $help_header = 'setup_enterprise_tab'; - break; - - default: - // Default. - break; - } - - // Header. - ui_print_page_header( - __('Configuration').$subpage, - '', - false, - $help_header, - true, - $buttons - ); - - if (isset($config['error_config_update_config'])) { - if ($config['error_config_update_config']['correct'] == false) { - ui_print_error_message($config['error_config_update_config']['message']); - } else { - ui_print_success_message(__('Correct update the setup options')); - } - - unset($config['error_config_update_config']); - } - - switch ($section) { - case 'general': - include_once $config['homedir'].'/godmode/setup/setup_general.php'; - break; - - case 'auth': - include_once $config['homedir'].'/godmode/setup/setup_auth.php'; - break; - - case 'perf': - include_once $config['homedir'].'/godmode/setup/performance.php'; - break; - - case 'net': - include_once $config['homedir'].'/godmode/setup/setup_netflow.php'; - break; - - case 'vis': - include_once $config['homedir'].'/godmode/setup/setup_visuals.php'; - break; - - case 'ehorus': - include_once $config['homedir'].'/godmode/setup/setup_ehorus.php'; - break; - - case 'integria': - include_once $config['homedir'].'/godmode/setup/setup_integria.php'; - break; - - case 'gis': - include_once $config['homedir'].'/godmode/setup/gis.php'; - break; - - case 'notifications': - include_once $config['homedir'].'/godmode/setup/setup_notifications.php'; - break; - - case 'websocket_engine': - include_once $config['homedir'].'/godmode/setup/setup_websocket_engine.php'; - break; - - default: - enterprise_hook('setup_enterprise_select_tab', [$section]); - break; - } + default: + enterprise_hook('setup_enterprise_select_tab', [$section]); + break; +} From f61ba42dd7aa139a5dd62e2180603281d2d89867 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 8 Jan 2020 15:48:07 +0100 Subject: [PATCH 06/18] Resolve conflicts --- pandora_console/godmode/setup/setup.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index e9b8160fdd..3aa66351b9 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -133,6 +133,11 @@ $buttons['notifications'] = [ 'text' => ''.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'', ]; +$buttons['gis'] = [ + 'active' => false, + 'text' => ''.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'', +]; + $buttons['websocket_engine'] = [ 'active' => false, 'text' => ''.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'', @@ -183,6 +188,11 @@ switch ($section) { $help_header = 'setup_integria_tab'; break; + case 'gis': + $buttons['gis']['active'] = true; + $subpage = ' » '.__('Map conections GIS'); + break; + case 'notifications': $buttons['notifications']['active'] = true; $subpage = ' » '.__('Notifications'); @@ -254,6 +264,10 @@ switch ($section) { include_once $config['homedir'].'/godmode/setup/setup_integria.php'; break; + case 'gis': + include_once $config['homedir'].'/godmode/setup/gis.php'; + break; + case 'notifications': include_once $config['homedir'].'/godmode/setup/setup_notifications.php'; break; From 665e9e4c98f9c98259d81ebc56c9f7e43f392245 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 8 Jan 2020 15:57:18 +0100 Subject: [PATCH 07/18] Show gis icon only if enabled gis --- pandora_console/godmode/setup/setup.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 3aa66351b9..a5f41ed999 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -133,16 +133,18 @@ $buttons['notifications'] = [ 'text' => ''.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'', ]; -$buttons['gis'] = [ - 'active' => false, - 'text' => ''.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'', -]; - $buttons['websocket_engine'] = [ 'active' => false, 'text' => ''.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'', ]; +if ($config['activate_gis']) { + $buttons['gis'] = [ + 'active' => false, + 'text' => ''.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'', + ]; +} + $help_header = ''; if (enterprise_installed()) { $subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header); From c21682145c63d2b94ddd6469554fbc98775b4c63 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 15 Jan 2020 10:37:05 +0100 Subject: [PATCH 08/18] Changed value for constants 1year, 2years, 3years --- pandora_console/include/constants.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 318496cfa8..1f0764bfaf 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -102,9 +102,9 @@ define('SECONDS_1MONTH', 2592000); define('SECONDS_2MONTHS', 5184000); define('SECONDS_3MONTHS', 7776000); define('SECONDS_6MONTHS', 15552000); -define('SECONDS_1YEAR', 31104000); -define('SECONDS_2YEARS', 62208000); -define('SECONDS_3YEARS', 93312000); +define('SECONDS_1YEAR', 31536000); +define('SECONDS_2YEARS', 63072000); +define('SECONDS_3YEARS', 94608000); From d79137148c79bc955e73a149e33dc753fa09de1b Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 28 Jan 2020 10:06:46 +0100 Subject: [PATCH 09/18] fix bug in group alert report data visualization --- .../include/functions_reporting.php | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 00909b8d08..61b367ea74 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3821,10 +3821,15 @@ function reporting_alert_report_group($report, $content) foreach ($actions['custom'] as $action) { $data_action[$naction]['name'] = $action['name']; $fired = $action['fired']; - if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) { + + if ($fired == 0) { $data_action[$naction]['fired'] = '----------------------------'; - } else { - $data_action[$naction]['fired'] = $fired; + } else if ($fired > 0) { + if ($fired > $datelimit && $fired < $datetime) { + $data_action[$naction]['fired'] = $fired; + } else { + continue 2; + } } $naction++; @@ -3833,10 +3838,15 @@ function reporting_alert_report_group($report, $content) foreach ($actions['default'] as $action) { $data_action[$naction]['name'] = $action['name']; $fired = $action['fired']; - if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) { + + if ($fired == 0) { $data_action[$naction]['fired'] = '----------------------------'; - } else { - $data_action[$naction]['fired'] = $fired; + } else if ($fired > 0) { + if ($fired > $datelimit && $fired < $datetime) { + $data_action[$naction]['fired'] = $fired; + } else { + continue 2; + } } $naction++; @@ -3845,10 +3855,15 @@ function reporting_alert_report_group($report, $content) foreach ($actions['unavailable'] as $action) { $data_action[$naction]['name'] = $action['name']; $fired = $action['fired']; - if ($fired == 0 || ($fired <= $datelimit || $fired > $datetime)) { + + if ($fired == 0) { $data_action[$naction]['fired'] = '----------------------------'; - } else { - $data_action[$naction]['fired'] = $fired; + } else if ($fired > 0) { + if ($fired > $datelimit && $fired < $datetime) { + $data_action[$naction]['fired'] = $fired; + } else { + continue 2; + } } $naction++; From 891c517611e477e7a0daf16312ea2a8701a646cd Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 30 Jan 2020 13:02:33 +0100 Subject: [PATCH 10/18] Fixed % with sprintf --- pandora_console/include/class/Tree.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 05b576e40f..011c91429d 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -123,7 +123,7 @@ class Tree return ''; } - return " AND tam.nombre LIKE '%%".$this->filter['searchModule']."%%' "; + return " AND tam.nombre LIKE '%%".str_replace('%', '%%', $this->filter['searchModule'])."%%' "; } @@ -133,7 +133,7 @@ class Tree return ''; } - return " AND LOWER(ta.alias) LIKE LOWER('%%".$this->filter['searchAgent']."%%')"; + return " AND LOWER(ta.alias) LIKE LOWER('%%".str_replace('%', '%%', $this->filter['searchAgent'])."%%')"; } @@ -331,7 +331,7 @@ class Tree return ''; } - return " AND tg.nombre LIKE '%%".$this->filter['searchGroup']."%%'"; + return " AND tg.nombre LIKE '%%".str_replace('%', '%%', $this->filter['searchGroup'])."%%'"; } From bf53eb5a6b9e11fd120cf221b4e849f12857a193 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 30 Jan 2020 17:29:07 +0100 Subject: [PATCH 11/18] Fixed XSS vulnerability --- pandora_console/include/functions_ui.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 9bfb9eca55..dea1614576 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3820,7 +3820,7 @@ function ui_get_url_refresh($params=false, $relative=true, $add_post=true) $url .= $key.'['.$k.']='.$v.'&'; } } else { - $url .= $key.'='.$value.'&'; + $url .= $key.'='.io_safe_input($value).'&'; } } From 73f3dfac851460f88f4af05ad4dee49b1643d1cc Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 31 Jan 2020 11:53:42 +0100 Subject: [PATCH 12/18] fix module string data with html special chars breaking html in page --- pandora_console/godmode/agentes/module_manager.php | 2 +- pandora_console/include/ajax/module.php | 2 +- pandora_console/include/class/Tree.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index b7b1d296ec..fcb8a1df52 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -832,7 +832,7 @@ foreach ($modules as $module) { $data[5] = ui_print_truncate_text($module['descripcion'], 'description', false); - $data[6] = ui_print_status_image($status, $title, true); + $data[6] = ui_print_status_image($status, htmlspecialchars($title), true); // MAX / MIN values if ($module['id_tipo_modulo'] != 25) { diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 43f9ff1fe6..8ecf0fff0d 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1022,7 +1022,7 @@ if (check_login()) { $title ); - $data[5] = ui_print_status_image($status, $title, true); + $data[5] = ui_print_status_image($status, htmlspecialchars($title), true); if (!$show_context_help_first_time) { $show_context_help_first_time = true; diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 05b576e40f..885fe1330f 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -623,7 +623,7 @@ class Tree } } - $module['statusImageHTML'] = ui_print_status_image($statusType, $statusTitle, true); + $module['statusImageHTML'] = ui_print_status_image($statusType, htmlspecialchars($statusTitle), true); // HTML of the server type image $module['serverTypeHTML'] = servers_show_type($module['server_type']); From d05551f85ae78bffaef788ee474d90c6d880a12d Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 3 Feb 2020 16:17:46 +0100 Subject: [PATCH 13/18] fix characters breaking html --- pandora_console/extensions/agents_modules.php | 16 +++++++++++----- .../operation/agentes/status_monitor.php | 16 ++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 77a7934af1..2bff449acf 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -801,17 +801,23 @@ function mainAgentsModules() $link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module_id.'&'.'refresh='.SECONDS_10MINUTES."', 'day_".$win_handle."')"; echo ''; + + $module_last_value = modules_get_last_value($module_id); + if (!is_numeric($module_last_value)) { + $module_last_value = htmlspecialchars($module_last_value); + } + switch ($status) { case AGENT_MODULE_STATUS_NORMAL: - ui_print_status_image('module_ok.png', modules_get_last_value($module_id), false); + ui_print_status_image('module_ok.png', $module_last_value, false); break; case AGENT_MODULE_STATUS_CRITICAL_BAD: - ui_print_status_image('module_critical.png', modules_get_last_value($module_id), false); + ui_print_status_image('module_critical.png', $module_last_value, false); break; case AGENT_MODULE_STATUS_WARNING: - ui_print_status_image('module_warning.png', modules_get_last_value($module_id), false); + ui_print_status_image('module_warning.png', $module_last_value, false); break; case AGENT_MODULE_STATUS_UNKNOWN: @@ -821,11 +827,11 @@ function mainAgentsModules() case AGENT_MODULE_STATUS_NORMAL_ALERT: case AGENT_MODULE_STATUS_WARNING_ALERT: case AGENT_MODULE_STATUS_CRITICAL_ALERT: - ui_print_status_image('module_alertsfired.png', modules_get_last_value($module_id), false); + ui_print_status_image('module_alertsfired.png', $module_last_value, false); break; case 4: - ui_print_status_image('module_no_data.png', modules_get_last_value($module_id), false); + ui_print_status_image('module_no_data.png', $module_last_value, false); break; } diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 21160d5ed8..59303227da 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1362,7 +1362,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_OK, - __('NORMAL').': '.$row['datos'], + __('NORMAL').': '.htmlspecialchars($row['datos']), true ); } @@ -1376,7 +1376,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_CRITICAL, - __('CRITICAL').': '.$row['datos'], + __('CRITICAL').': '.htmlspecialchars($row['datos']), true ); } @@ -1390,7 +1390,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_WARNING, - __('WARNING').': '.$row['datos'], + __('WARNING').': '.htmlspecialchars($row['datos']), true ); } @@ -1404,7 +1404,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').': '.$row['datos'], + __('UNKNOWN').': '.htmlspecialchars($row['datos']), true ); } @@ -1418,7 +1418,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_NO_DATA, - __('NO DATA').': '.$row['datos'], + __('NO DATA').': '.htmlspecialchars($row['datos']), true ); } @@ -1437,7 +1437,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.$row['datos'], + __('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.htmlspecialchars($row['datos']), true ); } @@ -1453,7 +1453,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.$row['datos'], + __('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.htmlspecialchars($row['datos']), true ); } @@ -1469,7 +1469,7 @@ if (!empty($result)) { } else { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.$row['datos'], + __('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.htmlspecialchars($row['datos']), true ); } From 3b233eeb90af6152ea82eb50f7d5f0eeaa676bf5 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 3 Feb 2020 18:01:28 +0100 Subject: [PATCH 14/18] changed functionality to not show trigger times that are not within the interval --- pandora_console/include/functions_reporting.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 61b367ea74..2b6f90935f 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3679,7 +3679,7 @@ function agents_get_network_interfaces_array( /** * reporting alert get fired */ -function reporting_alert_get_fired($id_agent_module, $id_alert_template_module, $period, $datetime) +function reporting_alert_get_fired($id_agent_module, $id_alert_template_module, $period, $datetime, $return_empty=true) { $fired = []; $firedTimes = get_module_alert_fired( @@ -3709,7 +3709,11 @@ function reporting_alert_get_fired($id_agent_module, $id_alert_template_module, if ($fireTime['utimestamp'] > $datelimit && $fireTime['utimestamp'] <= $datetime) { $fired[] = $fireTime['timestamp']; } else { - $fired[] = $empty; + if ($return_empty === true) { + $fired[] = $empty; + } else { + continue; + } } } @@ -3823,7 +3827,7 @@ function reporting_alert_report_group($report, $content) $fired = $action['fired']; if ($fired == 0) { - $data_action[$naction]['fired'] = '----------------------------'; + $data_action[$naction]['fired'] = __('Not triggered'); } else if ($fired > 0) { if ($fired > $datelimit && $fired < $datetime) { $data_action[$naction]['fired'] = $fired; @@ -3840,7 +3844,7 @@ function reporting_alert_report_group($report, $content) $fired = $action['fired']; if ($fired == 0) { - $data_action[$naction]['fired'] = '----------------------------'; + $data_action[$naction]['fired'] = __('Not triggered'); } else if ($fired > 0) { if ($fired > $datelimit && $fired < $datetime) { $data_action[$naction]['fired'] = $fired; @@ -3857,7 +3861,7 @@ function reporting_alert_report_group($report, $content) $fired = $action['fired']; if ($fired == 0) { - $data_action[$naction]['fired'] = '----------------------------'; + $data_action[$naction]['fired'] = __('Not triggered'); } else if ($fired > 0) { if ($fired > $datelimit && $fired < $datetime) { $data_action[$naction]['fired'] = $fired; @@ -3877,7 +3881,8 @@ function reporting_alert_report_group($report, $content) $agent_module['id_agent_module'], $actions['id'], (int) $content['period'], - (int) $report['datetime'] + (int) $report['datetime'], + false ); $module_actions['actions'] = $data_action; From 674f2a2873c0ba6b12a8fe3a735ca11b11d9d8d4 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 3 Feb 2020 18:04:52 +0100 Subject: [PATCH 15/18] minor fix: data string not being displayed correctly when module unknown --- pandora_console/extensions/agents_modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 2bff449acf..2954c50d46 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -821,7 +821,7 @@ function mainAgentsModules() break; case AGENT_MODULE_STATUS_UNKNOWN: - ui_print_status_image('module_unknown.png', modules_get_last_value($module_id), false); + ui_print_status_image('module_unknown.png', $module_last_value, false); break; case AGENT_MODULE_STATUS_NORMAL_ALERT: From 341583870033b0eb4d5a24a0b1d41b0e0ab393ba Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 4 Feb 2020 00:01:10 +0100 Subject: [PATCH 16/18] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 867e622c52..92a318a919 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.743-200203 +Version: 7.0NG.743-200204 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 21f351ba39..163c1f14a9 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.743-200203" +pandora_version="7.0NG.743-200204" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 0ba394b2a1..acac9c59ae 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.743'; -use constant AGENT_BUILD => '200203'; +use constant AGENT_BUILD => '200204'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 5b48e4b20a..1d30e0ec3c 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.743 -%define release 200203 +%define release 200204 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index bb3ccb8847..02509ffabc 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.743 -%define release 200203 +%define release 200204 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index a13fe9ff10..f9fa432fbe 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.743" -PI_BUILD="200203" +PI_BUILD="200204" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c93ec0e9c4..1643054378 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200203} +{200204} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a913cba32a..3492475e9c 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.743(Build 200203)") +#define PANDORA_VERSION ("7.0NG.743(Build 200204)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f1f70a52e9..b696931a44 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.743(Build 200203))" + VALUE "ProductVersion", "(7.0NG.743(Build 200204))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 758f49bace..0e3810012d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.743-200203 +Version: 7.0NG.743-200204 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index b08c06130e..8aff416511 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.743-200203" +pandora_version="7.0NG.743-200204" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0b90d0b3ed..6341ffc039 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC200203'; +$build_version = 'PC200204'; $pandora_version = 'v7.0NG.743'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e91a446368..b0c428d14e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 6f6428557b..f8ca5675cf 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.743 -%define release 200203 +%define release 200204 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 684c75e737..545d3d3b2b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.743 -%define release 200203 +%define release 200204 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 8691cecf76..aaa051c950 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.743" -PI_BUILD="200203" +PI_BUILD="200204" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4ecf5857dc..741a42f0dd 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.743 PS200203"; +my $version = "7.0NG.743 PS200204"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a75948a265..1b0ba3fca3 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.743 PS200203"; +my $version = "7.0NG.743 PS200204"; # save program name for logging my $progname = basename($0); From a51c17b51235c177bd4d1457586b47649e185777 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 4 Feb 2020 16:39:54 +0100 Subject: [PATCH 17/18] fix html special characters breaking html in modules search --- pandora_console/operation/search_modules.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php index 70915b30bd..4a5ca9f27f 100644 --- a/pandora_console/operation/search_modules.php +++ b/pandora_console/operation/search_modules.php @@ -81,6 +81,12 @@ if (!$modules || !$searchModules) { $intervalCell = modules_get_interval($module['id_agente_modulo']); + + $module_last_value = modules_get_last_value($module['id_agente_modulo']); + if (!is_numeric($module_last_value)) { + $module_last_value = htmlspecialchars($module_last_value); + } + if ($utimestamp_sql['utimestamp'] == 0 && ( ($module['id_tipo_modulo'] < 21 || $module['id_tipo_modulo'] > 23) && $module['id_tipo_modulo'] != 100) @@ -93,25 +99,25 @@ if (!$modules || !$searchModules) { } else if ($status_sql['estado'] == 0) { $statusCell = ui_print_status_image( STATUS_MODULE_OK, - __('NORMAL').': '.modules_get_last_value($module['id_agente_modulo']), + __('NORMAL').': '.$module_last_value, true ); } else if ($status_sql['estado'] == 1) { $statusCell = ui_print_status_image( STATUS_MODULE_CRITICAL, - __('CRITICAL').': '.modules_get_last_value($module['id_agente_modulo']), + __('CRITICAL').': '.$module_last_value, true ); } else if ($status_sql['estado'] == 2) { $statusCell = ui_print_status_image( STATUS_MODULE_WARNING, - __('WARNING').': '.modules_get_last_value($module['id_agente_modulo']), + __('WARNING').': '.$module_last_value, true ); } else if ($status_sql['estado'] == 3) { $statusCell = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').': '.modules_get_last_value($module['id_agente_modulo']), + __('UNKNOWN').': '.$module_last_value, true ); } else { @@ -120,7 +126,7 @@ if (!$modules || !$searchModules) { case 0: $statusCell = ui_print_status_image( STATUS_MODULE_OK, - __('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.modules_get_last_value($module['id_agente_modulo']), + __('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.$module_last_value, true ); break; @@ -128,7 +134,7 @@ if (!$modules || !$searchModules) { case 1: $statusCell = ui_print_status_image( STATUS_MODULE_CRITICAL, - __('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.modules_get_last_value($module['id_agente_modulo']), + __('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.$module_last_value, true ); break; @@ -136,7 +142,7 @@ if (!$modules || !$searchModules) { case 2: $statusCell = ui_print_status_image( STATUS_MODULE_WARNING, - __('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.modules_get_last_value($module['id_agente_modulo']), + __('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.$module_last_value, true ); break; From 70e5486ce6b7492fc3735a4b2a27385d5d0b2ca1 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 5 Feb 2020 00:01:11 +0100 Subject: [PATCH 18/18] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 92a318a919..f70e1e6293 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.743-200204 +Version: 7.0NG.743-200205 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 163c1f14a9..cc2c966b60 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.743-200204" +pandora_version="7.0NG.743-200205" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index acac9c59ae..079c749bf3 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.743'; -use constant AGENT_BUILD => '200204'; +use constant AGENT_BUILD => '200205'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 1d30e0ec3c..ec5f1de901 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.743 -%define release 200204 +%define release 200205 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 02509ffabc..c70fe5c5bb 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.743 -%define release 200204 +%define release 200205 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index f9fa432fbe..af74af808b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.743" -PI_BUILD="200204" +PI_BUILD="200205" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1643054378..a8de2b5098 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200204} +{200205} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 3492475e9c..a1601e4ab6 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.743(Build 200204)") +#define PANDORA_VERSION ("7.0NG.743(Build 200205)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b696931a44..fd39cb9d48 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.743(Build 200204))" + VALUE "ProductVersion", "(7.0NG.743(Build 200205))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0e3810012d..6c919a9950 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.743-200204 +Version: 7.0NG.743-200205 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 8aff416511..83b0db1832 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.743-200204" +pandora_version="7.0NG.743-200205" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6341ffc039..cebaec8e4d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC200204'; +$build_version = 'PC200205'; $pandora_version = 'v7.0NG.743'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b0c428d14e..00138f498f 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index f8ca5675cf..f2137b9e72 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.743 -%define release 200204 +%define release 200205 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 545d3d3b2b..24967a89dd 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.743 -%define release 200204 +%define release 200205 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index aaa051c950..35053e3c81 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.743" -PI_BUILD="200204" +PI_BUILD="200205" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 741a42f0dd..417b4cf30f 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.743 PS200204"; +my $version = "7.0NG.743 PS200205"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1b0ba3fca3..c3992c23db 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.743 PS200204"; +my $version = "7.0NG.743 PS200205"; # save program name for logging my $progname = basename($0);