diff --git a/pandora_agents/pc/tentacle_server b/pandora_agents/pc/tentacle_server index d945a134e8..4458237003 100755 --- a/pandora_agents/pc/tentacle_server +++ b/pandora_agents/pc/tentacle_server @@ -5,7 +5,7 @@ # Tentacle have IANA assigned port tpc/41121 as official port. ########################################################################## # Copyright (c) 2007-2008 Ramon Novoa -# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L +# Copyright (c) 2005-2022 Artica Soluciones Tecnologicas S.L # # tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for # protocol description. @@ -1740,6 +1740,19 @@ sub callback_stop { Win32::Daemon::StopService(); } + +################################################################################ +## SUB check_ssleay_version +## Print a message if the installed version of Net::SSLeay may leak memory. +################################################################################ +sub check_ssleay_version { + eval { + require Net::SSLeay; + return unless defined($Net::SSLeay::VERSION) && $Net::SSLeay::VERSION =~ m/^(\d+)\.(\d+)/ && $1 <= 1 && $2 < 88; + print_log ("Net::SSLeay version $Net::SSLeay::VERSION detected. Versions prior to 1.88 may leak memory. To upgrade it see: https://metacpan.org/pod/Net::SSLeay"); + }; +} + ################################################################################ # Main ################################################################################ @@ -1753,12 +1766,20 @@ if ($> == 0 && $^O ne 'MSWin32') { # Parse command line options parse_options (); +# Try to open the log file. +if (defined($log_file)) { + open(my $fh, ">>", $log_file) || die("Error opening the log file '$log_file': $!.\n"); + close($fh); +} + # Check command line arguments if ($#ARGV != -1) { print_help (); exit 1; } +check_ssleay_version() if $t_ssl == 1; + # Show IPv6 status if ($SOCKET_MODULE eq 'IO::Socket::INET') { print_log ("IO::Socket::INET6 is not found. IPv6 is disabled."); diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0c451c6e8f..ebfff00cee 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.765-221004 +Version: 7.0NG.765-221027 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 a311a01113..1ea6543168 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.765-221004" +pandora_version="7.0NG.765-221027" 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 9eafe7a784..35e11a7267 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.765'; -use constant AGENT_BUILD => '221004'; +use constant AGENT_BUILD => '221027'; # 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 d8a6af044a..272af1ec3f 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.765 -%define release 221004 +%define release 221027 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 48b924f644..0f4f47e311 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.765 -%define release 221004 +%define release 221027 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 9febdb2b19..731b67e899 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.765" -PI_BUILD="221004" +PI_BUILD="221027" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/unix/tentacle_server b/pandora_agents/unix/tentacle_server index d945a134e8..4458237003 100755 --- a/pandora_agents/unix/tentacle_server +++ b/pandora_agents/unix/tentacle_server @@ -5,7 +5,7 @@ # Tentacle have IANA assigned port tpc/41121 as official port. ########################################################################## # Copyright (c) 2007-2008 Ramon Novoa -# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L +# Copyright (c) 2005-2022 Artica Soluciones Tecnologicas S.L # # tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for # protocol description. @@ -1740,6 +1740,19 @@ sub callback_stop { Win32::Daemon::StopService(); } + +################################################################################ +## SUB check_ssleay_version +## Print a message if the installed version of Net::SSLeay may leak memory. +################################################################################ +sub check_ssleay_version { + eval { + require Net::SSLeay; + return unless defined($Net::SSLeay::VERSION) && $Net::SSLeay::VERSION =~ m/^(\d+)\.(\d+)/ && $1 <= 1 && $2 < 88; + print_log ("Net::SSLeay version $Net::SSLeay::VERSION detected. Versions prior to 1.88 may leak memory. To upgrade it see: https://metacpan.org/pod/Net::SSLeay"); + }; +} + ################################################################################ # Main ################################################################################ @@ -1753,12 +1766,20 @@ if ($> == 0 && $^O ne 'MSWin32') { # Parse command line options parse_options (); +# Try to open the log file. +if (defined($log_file)) { + open(my $fh, ">>", $log_file) || die("Error opening the log file '$log_file': $!.\n"); + close($fh); +} + # Check command line arguments if ($#ARGV != -1) { print_help (); exit 1; } +check_ssleay_version() if $t_ssl == 1; + # Show IPv6 status if ($SOCKET_MODULE eq 'IO::Socket::INET') { print_log ("IO::Socket::INET6 is not found. IPv6 is disabled."); diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ff3477642f..287fe9555d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{221004} +{221027} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 03cb82a538..33a6d1d75a 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.765 Build 221004") +#define PANDORA_VERSION ("7.0NG.765 Build 221027") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9cb97ec720..f3f8d0b0a5 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.765(Build 221004))" + VALUE "ProductVersion", "(7.0NG.765(Build 221027))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a2d46b64a7..38c270ef24 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.765-221004 +Version: 7.0NG.765-221027 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 12f1fcceec..3c85f0dc26 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.765-221004" +pandora_version="7.0NG.765-221027" package_pear=0 package_pandora=1 diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index 8b98d1c34a..bea9dfc771 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -110,12 +110,13 @@ $auth_class = io_safe_output( $page = (string) get_parameter('page'); $page = safe_url_extraclean($page); $page .= '.php'; +$page = realpath($page); $public_hash = get_parameter('auth_hash', false); $public_login = false; if (false === ((bool) get_parameter('doLogin', false) === true - && $page === 'include/rest-api/index.php') + && $page === realpath('include/rest-api/index.php')) ) { // Check user. if (class_exists($auth_class) === false || $public_hash === false) { diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index f9acc8ade4..96223ccd69 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -1666,3 +1666,4 @@ godmode/um_client/vendor/sebastian/object-enumerator godmode/um_client/vendor/sebastian godmode/um_client/vendor update_manager_client/resources/styles/pandora.css +enterprise/meta/general/upload_head_image.php diff --git a/pandora_console/extras/mr/58.sql b/pandora_console/extras/mr/58.sql index 038f4ad75a..7a1bd95369 100644 --- a/pandora_console/extras/mr/58.sql +++ b/pandora_console/extras/mr/58.sql @@ -1,5 +1,12 @@ START TRANSACTION; +ALTER TABLE `tusuario` ADD COLUMN `auth_token_secret` VARCHAR(45) DEFAULT NULL; + +ALTER TABLE `tmodule_inventory` ADD COLUMN `script_mode` INT NOT NULL DEFAULT 2; +ALTER TABLE `tmodule_inventory` ADD COLUMN `script_path` VARCHAR(1000) DEFAULT ''; + +ALTER TABLE `tevent_filter` ADD COLUMN `search_recursive_groups` INT NOT NULL DEFAULT 0; + ALTER TABLE `tcredential_store` MODIFY COLUMN `product` ENUM('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP', 'WMI', 'SNMP') DEFAULT 'CUSTOM'; COMMIT; diff --git a/pandora_console/general/register.php b/pandora_console/general/register.php index 215e9642ef..e71c96fb0f 100644 --- a/pandora_console/general/register.php +++ b/pandora_console/general/register.php @@ -187,7 +187,7 @@ if (!$double_auth_enabled }) .show(); // Don't allow close the dialog with X button - $('.ui-dialog-titlebar-close').css('display', 'none'); + // $('.ui-dialog-titlebar-close').css('display', 'none'); data[2][3] = __('Max. Value'); $table_advanced->data[2][4] = html_print_input_text('max', $max, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy); $table_advanced->colspan[2][4] = 3; - $table_advanced->data[3][0] = __('Dynamic Threshold Interval'); $table_advanced->data[3][1] = html_print_extended_select_for_time( 'dynamic_interval', $dynamic_interval, '', - 'None', + __('None'), '0', 10, true, diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index cec18a21ca..ed41aee0ef 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -1104,11 +1104,7 @@ $table->data[1][0] = __('Available agents'); $table->data[1][1] = html_print_select($agents, 'id_agents[]', -1, '', _('Any'), -2, true, true, true, '', false, 'min-width: 250px;width: 70%;'); -if ($type_downtime != 'quiet') { - echo ''; echo "