diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index 72ee496fa0..9917f99631 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -394,8 +394,8 @@ console_dependencies=" \ mod_ssl \ libzstd \ openldap-clients \ - https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ - https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm \ diff --git a/extras/deploy-scripts/pandora_deploy_community_el9.sh b/extras/deploy-scripts/pandora_deploy_community_el9.sh index 70b473b49b..738833d774 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el9.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el9.sh @@ -386,8 +386,8 @@ console_dependencies=" \ mod_ssl \ libzstd \ openldap-clients \ - https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ - https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm " execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies" diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index 6d0bb69d06..4f541b4125 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -371,7 +371,7 @@ ln -s /usr/bin/fping /usr/sbin/fping &>> "$LOGFILE" # Chrome rm -f /usr/bin/chromium-browser &>> "$LOGFILE" -CHROME_VERSION=google-chrome-stable_110.0.5481.177-1_amd64.deb +CHROME_VERSION=google-chrome-stable_122.0.6261.128-1_amd64.deb execute_cmd "wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/${CHROME_VERSION}" "Downloading google chrome" execute_cmd "apt install -y ./${CHROME_VERSION}" "Intalling google chrome" execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink" diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2f68d61fa0..49a0183938 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.776-240403 +Version: 7.0NG.776-240404 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 2ead6c3ea5..8bb7b260a7 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.776-240403" +pandora_version="7.0NG.776-240404" 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 a28c816f2e..5d3739cf0a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.776'; -use constant AGENT_BUILD => '240403'; +use constant AGENT_BUILD => '240404'; # 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 fe4e8523ca..b0ba0ab82d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240403 +%define release 240404 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 75392b5824..a367cc3aad 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240403 +%define release 240404 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 7e7b99ee68..abf4fb7654 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240403 +%define release 240404 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 68b9e1e803..a4079517e7 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240403 +%define release 240404 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index d347fc2a5a..f16c6773a5 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240403 +%define release 240404 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 945445dbcc..6393c44e2f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240403" +PI_BUILD="240404" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 82a73d292f..3c78f290ea 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240403} +{240404} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0c2965d723..c3675292b4 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.776 Build 240403") +#define PANDORA_VERSION ("7.0NG.776 Build 240404") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 848f06553e..374f404f59 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.776(Build 240403))" + VALUE "ProductVersion", "(7.0NG.776(Build 240404))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 705c240e87..d651c78e45 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.776-240403 +Version: 7.0NG.776-240404 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 4958e0ca16..5e4f8f1baa 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.776-240403" +pandora_version="7.0NG.776-240404" package_pear=0 package_pandora=1 diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 0bd26e3439..0df61ee1c2 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -1333,10 +1333,9 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m }, open: function() { $(`#update_action-div-${alert_id}`).css('overflow', 'hidden'); - //$(`#action_select_ajax-${alert_id}`).select2({ - // tags: true, - // dropdownParent: $(`#update_action-div-${alert_id}`) - //}); + $(`#update_action-div-${alert_id} select`).select2({ + dropdownParent: $(this).parent() + }); }, width: 600, height: 350 diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index 5bd57522fd..33ed7b6dca 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -350,7 +350,8 @@ function update_template($step) 'previous_name' => $previous_name, ]; - if ($name_check === false) { + $original_name = db_get_value('name', 'talert_templates', 'id', $id); + if ($name_check === false || $original_name === $name_check) { $result = alerts_update_alert_template($id, $values); } else { ui_print_warning_message(__('Another template with the same name already exists')); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 38206b060c..9681d79102 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -911,7 +911,7 @@ switch ($action) { // Admin options only for RM flag. - if (check_acl($config['id_user'], 0, 'RM')) { + if (check_acl($config['id_user'], 0, 'RR')) { $table->head[$next] = __('Private'); $table->headstyle[$next] = 'min-width: 40px;text-align: left;'; $table->size[$next] = '2%'; @@ -929,7 +929,7 @@ switch ($action) { $next++; $op_column = false; - if (is_metaconsole() === false) { + if (is_metaconsole() === false && check_acl($config['id_user'], 0, 'RM')) { $op_column = true; $table->head[$next] = ''.__('Op.').''.html_print_checkbox( 'all_delete', @@ -1082,7 +1082,7 @@ switch ($action) { } // Admin options only for RM flag. - if (check_acl($config['id_user'], 0, 'RM')) { + if (check_acl($config['id_user'], 0, 'RR')) { if ($report['private'] == 1) { $data[$next] = __('Yes'); } else { @@ -2408,10 +2408,15 @@ switch ($action) { $values['server_name'] = get_parameter('combo_server_sql'); if ($sql !== '') { + // Replaces possible macros to check the validity of the query + $macros_sql = $sql; + $macros_sql = str_replace('_start_date_', '0', $macros_sql); + $macros_sql = str_replace('_end_date_', 'NOW()', $macros_sql); + if ($values['server_name'] === 'all') { $servers_connection = metaconsole_get_connections(); foreach ($servers_connection as $key => $s) { - $good_format = db_validate_sql($sql, $s['server_name']); + $good_format = db_validate_sql($macros_sql, $s['server_name']); } // Reconnected in nodo if exist. @@ -2423,9 +2428,9 @@ switch ($action) { } } else if ($server_id === 0) { // Connect with node if not exist conexion. - $good_format = db_validate_sql($sql, (is_metaconsole() === true) ? $values['server_name'] : false); + $good_format = db_validate_sql($macros_sql, (is_metaconsole() === true) ? $values['server_name'] : false); } else { - $good_format = db_validate_sql($sql); + $good_format = db_validate_sql($macros_sql); } } } else if ($values['type'] == 'url') { @@ -3353,10 +3358,15 @@ switch ($action) { if ($sql !== '') { + // Replaces possible macros to check the validity of the query + $macros_sql = $sql; + $macros_sql = str_replace('_start_date_', '0', $macros_sql); + $macros_sql = str_replace('_end_date_', 'NOW()', $macros_sql); + if ($values['server_name'] === 'all') { $servers_connection = metaconsole_get_connections(); foreach ($servers_connection as $key => $s) { - $good_format = db_validate_sql($sql, $s['server_name']); + $good_format = db_validate_sql($macros_sql, $s['server_name']); } // Reconnected in nodo if exist. @@ -3368,9 +3378,9 @@ switch ($action) { } } else if ($server_id === 0) { // Connect with node if not exist conexion. - $good_format = db_validate_sql($sql, (is_metaconsole() === true) ? $values['server_name'] : false); + $good_format = db_validate_sql($macros_sql, (is_metaconsole() === true) ? $values['server_name'] : false); } else { - $good_format = db_validate_sql($sql); + $good_format = db_validate_sql($macros_sql); } } } else if ($values['type'] == 'url') { diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 7a651a7a43..bbd77f7b14 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -49,8 +49,8 @@ $date = time(); $servers = servers_get_info(); if ($servers === false) { - $server_clippy = clippy_context_help('servers_down'); - echo "