From 086bc289868502f46ee8c8a779c35b802fc63c6b Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 27 Apr 2020 17:27:54 +0200 Subject: [PATCH 1/8] Changed target ip selector in WMI server policy modules --- .../agentes/module_manager_editor_wmi.php | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_wmi.php b/pandora_console/godmode/agentes/module_manager_editor_wmi.php index 09501c358b..9a85c3c19d 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_wmi.php +++ b/pandora_console/godmode/agentes/module_manager_editor_wmi.php @@ -43,7 +43,47 @@ if (empty($update_module_id)) { $data = []; $data[0] = __('Target IP').' '.ui_print_help_icon('wmi_module_tab', true); -$data[1] = html_print_input_text('ip_target', $ip_target, '', 15, 60, true); + +if ($page == 'enterprise/godmode/policies/policy_modules') { + if ($ip_target != 'auto' && $ip_target != '') { + $custom_ip_target = $ip_target; + $ip_target = 'custom'; + } else if ($ip_target == '') { + $ip_target = 'force_pri'; + $custom_ip_target = ''; + } else { + $custom_ip_target = ''; + } + + $target_ip_values = []; + $target_ip_values['auto'] = __('Auto'); + $target_ip_values['force_pri'] = __('Force primary key'); + $target_ip_values['custom'] = __('Custom'); + + $data[1] = html_print_select( + $target_ip_values, + 'ip_target', + $ip_target, + '', + '', + '', + true, + false, + false, + '', + false, + 'width:200px;' + ); + + $data[1] .= html_print_input_text('custom_ip_target', $custom_ip_target, '', 15, 60, true); +} else { + if ($ip_target == 'auto') { + $ip_target = agents_get_address($id_agente); + } + + $data[1] = html_print_input_text('ip_target', $ip_target, '', 15, 60, true); +} + $data[2] = __('Namespace').ui_print_help_tip(__('Optional. WMI namespace. If unsure leave blank.'), true); $data[3] = html_print_input_text( 'tcp_send', @@ -136,3 +176,21 @@ $data[3] = html_print_input_text( ); push_table_simple($data, 'key_field'); +?> + From db630a75dbd70ef8b28e9cbd9bce519b7532dd2b Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 20 May 2020 16:39:19 +0200 Subject: [PATCH 2/8] Fixed SLA error counter check --- .../include/functions_reporting.php | 40 ++++++++++++++++--- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 98eb1b5025..be2203489d 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -6147,7 +6147,13 @@ function reporting_advanced_sla( $time_total += $time_interval; if ($time_interval > 0) { - $total_checks++; + if (isset($current_data['type']) === false + || ((int) $current_data['type'] === 0 + && $i !== 0) + ) { + $total_checks++; + } + if ((isset($current_data['datos'])) && ($current_data['datos'] !== false) ) { @@ -6159,7 +6165,7 @@ function reporting_advanced_sla( $match = preg_match('/'.$max_value.'/', $current_data['datos']); } - // Take notice of $inverse_interval value, + // Take notice of $inverse_interval value. if ($inverse_interval == 0) { $sla_check_value = $match; } else { @@ -6176,19 +6182,41 @@ function reporting_advanced_sla( // Not unknown nor not init values. if ($sla_check_value) { - $ok_checks++; + if (isset($current_data['type']) === false + || ((int) $current_data['type'] === 0 + && $i !== 0) + ) { + $ok_checks++; + } + $time_in_ok += $time_interval; } else { - $bad_checks++; + if (isset($current_data['type']) === false + || ((int) $current_data['type'] === 0 + && $i !== 0) + ) { + $bad_checks++; + } + $time_in_error += $time_interval; } } else { if ($current_data['datos'] === null) { $time_in_unknown += $time_interval; - $unknown_checks++; + if (isset($current_data['type']) === false + || ((int) $current_data['type'] === 0 + && $i !== 0) + ) { + $unknown_checks++; + } } else if ($current_data['datos'] === false) { $time_in_not_init += $time_interval; - $not_init_checks++; + if (isset($current_data['type']) === false + || ((int) $current_data['type'] === 0 + && $i !== 0) + ) { + $not_init_checks++; + } } } } From 43701f953dae05a6d3fa39edb7ec3e91bb29687b Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 3 Jun 2020 17:37:12 +0200 Subject: [PATCH 3/8] fixed ad authentication --- pandora_console/include/auth/mysql.php | 45 ++++++++++++++------------ 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index ed5e56782a..064be4a93e 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -85,7 +85,7 @@ function process_user_login($login, $pass, $api=false) return process_user_login_local($login, $pass, $api); } else { $login_remote = process_user_login_remote($login, io_safe_output($pass), $api); - if ($login_remote == false) { + if ($login_remote == false && $config['fallback_local_auth']) { return process_user_login_local($login, $pass, $api); } else { return $login_remote; @@ -258,27 +258,32 @@ function process_user_login_remote($login, $pass, $api=false) return false; } - if (($config['auth'] === 'ad') - && (isset($config['ad_advanced_config']) && $config['ad_advanced_config']) - ) { - $return = enterprise_hook( - 'prepare_permissions_groups_of_user_ad', - [ - $login, - $pass, - false, - true, - defined('METACONSOLE'), - ] - ); + if (($config['auth'] === 'ad')) { + // Check if autocreate remote users is active. + if ($config['autocreate_remote_users'] == 1) { + change_local_user_pass_ldap($login, $pass); + } - if ($return === 'error_permissions') { - $config['auth_error'] = __('Problems with configuration permissions. Please contact with Administrator'); - return false; - } else { - if ($return === 'permissions_changed') { - $config['auth_error'] = __('Your permissions have changed. Please, login again.'); + if (isset($config['ad_advanced_config']) && $config['ad_advanced_config']) { + $return = enterprise_hook( + 'prepare_permissions_groups_of_user_ad', + [ + $login, + $pass, + false, + true, + defined('METACONSOLE'), + ] + ); + + if ($return === 'error_permissions') { + $config['auth_error'] = __('Problems with configuration permissions. Please contact with Administrator'); return false; + } else { + if ($return === 'permissions_changed') { + $config['auth_error'] = __('Your permissions have changed. Please, login again.'); + return false; + } } } } else if ($config['auth'] === 'ldap') { From 1c7d4140a2bfc1b09e7e8dc6397186a0af9bae43 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 9 Jun 2020 13:20:15 +0200 Subject: [PATCH 4/8] fixed XSS --- pandora_console/include/functions_snmp_browser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 224a4ecc3f..2b14ac86b3 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -159,7 +159,7 @@ function snmp_browser_get_html_tree( $status = (!empty($checked) && isset($checked[$level])); $output .= html_print_checkbox($checkbox_name, 0, $status, true, false, '').' '.$level.''; if (isset($sub_level['__VALUE__'])) { - $output .= ''; + $output .= ''; } $output .= ''; From 057fcea72442db33b8f445b97e20cec4b9571c7a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 11 Jun 2020 14:53:34 +0200 Subject: [PATCH 5/8] DB2 discovery --- .../godmode/wizards/DiscoveryTaskList.class.php | 15 +++++++++++++++ pandora_console/include/constants.php | 1 + pandora_server/lib/PandoraFMS/Recon/Base.pm | 11 ++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 88506f4a02..59a9fab84a 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -629,6 +629,16 @@ class DiscoveryTaskList extends HTML $data[6] .= __('Discovery.App.Oracle'); break; + case DISCOVERY_APP_DB2: + // Discovery Applications DB2. + $data[6] = html_print_image( + 'images/network.png', + true, + ['title' => __('Discovery Applications DB2')] + ).'  '; + $data[6] .= __('Discovery.App.DB2'); + break; + case DISCOVERY_DEPLOY_AGENTS: // Internal deployment task. $no_operations = true; @@ -722,6 +732,8 @@ class DiscoveryTaskList extends HTML if ($task['disabled'] != 2 && $task['utimestamp'] > 0 && $task['type'] != DISCOVERY_APP_MYSQL && $task['type'] != DISCOVERY_APP_ORACLE + && $task['type'] != DISCOVERY_APP_DB2 + && $task['type'] != DISCOVERY_APP_SAP && $task['type'] != DISCOVERY_CLOUD_AWS_RDS ) { if (check_acl($config['id_user'], 0, 'MR')) { @@ -879,6 +891,9 @@ class DiscoveryTaskList extends HTML case DISCOVERY_APP_ORACLE: return 'wiz=app&mode=oracle&page=0'; + case DISCOVERY_APP_DB2: + return 'wiz=app&mode=DB2&page=0'; + case DISCOVERY_CLOUD_AWS: case DISCOVERY_CLOUD_AWS_EC2: return 'wiz=cloud&mode=amazonws&ki='.$task['auth_strings'].'&page=1'; diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 25674080d0..c2f6a5d74c 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -601,6 +601,7 @@ define('DISCOVERY_CLOUD_AWS_RDS', 7); define('DISCOVERY_CLOUD_AZURE_COMPUTE', 8); define('DISCOVERY_DEPLOY_AGENTS', 9); define('DISCOVERY_APP_SAP', 10); +define('DISCOVERY_APP_DB2', 11); // Force task build tmp results. diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 2e54650f7c..1f6e13f2e6 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -40,6 +40,7 @@ use constant { DISCOVERY_CLOUD_AZURE_COMPUTE => 8, DISCOVERY_DEPLOY_AGENTS => 9, DISCOVERY_APP_SAP => 10, + DISCOVERY_APP_DB2 => 11, DISCOVERY_REVIEW => 0, DISCOVERY_STANDARD => 1, DISCOVERY_RESULTS => 2, @@ -1661,6 +1662,9 @@ sub database_scan($$$) { # Skip database scan in Oracle tasks next if defined($self->{'type'}) && $self->{'type'} == DISCOVERY_APP_ORACLE; + # Skip database scan in DB2 tasks + next if defined($self->{'type'}) && $self->{'type'} == DISCOVERY_APP_DB2; + my $__data = $obj->scan_databases(); if (ref($__data) eq "ARRAY") { @@ -1705,6 +1709,8 @@ sub app_scan($) { $type = 'MySQL'; } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) { $type = 'Oracle'; + } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2) { + $type = 'DB2'; } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { $type = 'SAP'; } else { @@ -1787,7 +1793,9 @@ sub app_scan($) { # Scan connected obj. if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL - || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) { + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2 + ) { # Database. $results = $self->database_scan($type, $obj, $global_percent, \@targets); @@ -1894,6 +1902,7 @@ sub scan($) { if (defined($self->{'task_data'})) { if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2 || $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { # Application scan. $self->call('message', "Scanning application ...", 6); From c6c9b63338160cfb8e69ec64ab323990c365be7a Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 18 Jun 2020 01:00:14 +0200 Subject: [PATCH 6/8] 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 d6354e3264..f5031758af 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.746-200617 +Version: 7.0NG.746-200618 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 ebf1db1cd6..2df6cdfa2a 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.746-200617" +pandora_version="7.0NG.746-200618" 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 c1544a1c73..f514095856 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.746'; -use constant AGENT_BUILD => '200617'; +use constant AGENT_BUILD => '200618'; # 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 08574ef764..30a85c8962 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.746 -%define release 200617 +%define release 200618 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 cb16f57d9d..f213fd4abb 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.746 -%define release 200617 +%define release 200618 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 f4f03b1a40..53d2823fd6 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200617" +PI_BUILD="200618" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index e654b4779c..6b1ad3b147 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200617} +{200618} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a6729d9272..6cb7a928f3 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.746(Build 200617)") +#define PANDORA_VERSION ("7.0NG.746(Build 200618)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4227662906..56ef1a2905 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.746(Build 200617))" + VALUE "ProductVersion", "(7.0NG.746(Build 200618))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9db199ff25..caeabd6e93 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.746-200617 +Version: 7.0NG.746-200618 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 e384ee3f34..151d3e2732 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.746-200617" +pandora_version="7.0NG.746-200618" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ba3935d598..43c0767baf 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 = 'PC200617'; +$build_version = 'PC200618'; $pandora_version = 'v7.0NG.746'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 34dfb1ad65..d41ca35531 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 255eef61fc..219900abca 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.746 -%define release 200617 +%define release 200618 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index eb13f3eb34..c03d5ab75f 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.746 -%define release 200617 +%define release 200618 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 62fd9e76e7..5fcc864e8a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200617" +PI_BUILD="200618" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7b7d84700d..b0a1ee7c43 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.746 PS200617"; +my $version = "7.0NG.746 PS200618"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 31d3e0b79d..8ed5342507 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.746 PS200617"; +my $version = "7.0NG.746 PS200618"; # save program name for logging my $progname = basename($0); From 28da2b9afbf27ca905e38488aa8f6b95e5b5157f Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 18 Jun 2020 13:19:04 +0200 Subject: [PATCH 7/8] 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]; } From 9beb1ce22f37b3a5c8434ffe5d7e7955bf6920d9 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 19 Jun 2020 01:00:15 +0200 Subject: [PATCH 8/8] 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 f5031758af..cce401a38e 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.746-200618 +Version: 7.0NG.746-200619 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 2df6cdfa2a..6000a4649c 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.746-200618" +pandora_version="7.0NG.746-200619" 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 f514095856..8235ef30a7 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.746'; -use constant AGENT_BUILD => '200618'; +use constant AGENT_BUILD => '200619'; # 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 30a85c8962..c0ffaffb19 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.746 -%define release 200618 +%define release 200619 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 f213fd4abb..541b3cd798 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.746 -%define release 200618 +%define release 200619 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 53d2823fd6..dab87f1b01 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200618" +PI_BUILD="200619" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 6b1ad3b147..be816e92f3 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200618} +{200619} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6cb7a928f3..08ec60e1ca 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.746(Build 200618)") +#define PANDORA_VERSION ("7.0NG.746(Build 200619)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 56ef1a2905..1f1d27db3d 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.746(Build 200618))" + VALUE "ProductVersion", "(7.0NG.746(Build 200619))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index caeabd6e93..b26e961b95 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.746-200618 +Version: 7.0NG.746-200619 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 151d3e2732..3a3f26957c 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.746-200618" +pandora_version="7.0NG.746-200619" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 43c0767baf..e095c0232d 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 = 'PC200618'; +$build_version = 'PC200619'; $pandora_version = 'v7.0NG.746'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d41ca35531..1ddf8abea9 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 219900abca..a6ef18ad7f 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.746 -%define release 200618 +%define release 200619 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c03d5ab75f..7edbdac71a 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.746 -%define release 200618 +%define release 200619 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 5fcc864e8a..cdb2836dd4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.746" -PI_BUILD="200618" +PI_BUILD="200619" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b0a1ee7c43..f7c960eb9c 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.746 PS200618"; +my $version = "7.0NG.746 PS200619"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8ed5342507..92bd7663dc 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.746 PS200618"; +my $version = "7.0NG.746 PS200619"; # save program name for logging my $progname = basename($0);