diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 271486bbcb..3a3027a6fd 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.742-200110
+Version: 7.0NG.742-200113
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 1023942f57..c9453f3fb2 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.742-200110"
+pandora_version="7.0NG.742-200113"
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 d586df1175..4d728d0008 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.742';
-use constant AGENT_BUILD => '200110';
+use constant AGENT_BUILD => '200113';
# 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 a4348b972d..047ee13afe 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.742
-%define release 200110
+%define release 200113
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 9c237621ec..9aa2292cee 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.742
-%define release 200110
+%define release 200113
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 6367b03824..e163bd087c 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.742"
-PI_BUILD="200110"
+PI_BUILD="200113"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 4f959dbb5e..bec07f8982 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{200110}
+{200113}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index fe1e45b5cc..004eccac56 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.742(Build 200110)")
+#define PANDORA_VERSION ("7.0NG.742(Build 200113)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 4bda8a6719..07f4a61cc6 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.742(Build 200110))"
+ VALUE "ProductVersion", "(7.0NG.742(Build 200113))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 71905b7ebf..cd5255f13a 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.742-200110
+Version: 7.0NG.742-200113
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 87e7e5ee76..5616aecefa 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.742-200110"
+pandora_version="7.0NG.742-200113"
package_pear=0
package_pandora=1
diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php
index 602a536f5a..cd93489653 100644
--- a/pandora_console/godmode/users/configure_user.php
+++ b/pandora_console/godmode/users/configure_user.php
@@ -243,6 +243,12 @@ if ($create_user) {
$password_new = '';
$password_confirm = '';
$new_user = true;
+ } else if (preg_match('/^\s+|\s+$/', io_safe_output($id))) {
+ ui_print_error_message(__('Invalid user ID: leading or trailing blank spaces not allowed'));
+ $user_info = $values;
+ $password_new = '';
+ $password_confirm = '';
+ $new_user = true;
} else if ($password_new == '') {
ui_print_error_message(__('Passwords cannot be empty'));
$user_info = $values;
diff --git a/pandora_console/include/ajax/update_manager.ajax.php b/pandora_console/include/ajax/update_manager.ajax.php
index 1988916bd5..023766a99e 100644
--- a/pandora_console/include/ajax/update_manager.ajax.php
+++ b/pandora_console/include/ajax/update_manager.ajax.php
@@ -404,6 +404,13 @@ if ($search_minor) {
$return['have_minor'] = true;
$size_mr = get_number_of_mr($package, $ent, $offline);
$return['mr'] = $size_mr;
+ } else {
+ $product_name = io_safe_output(get_product_name());
+ $version = get_parameter('version', '');
+ db_pandora_audit(
+ 'ERROR: Update '.$product_name,
+ 'Update version of '.$product_name.' by '.$config['id_user'].' has failed.'
+ );
}
echo json_encode($return);
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 9c424f92e2..56ec47231b 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 = 'PC200110';
+$build_version = 'PC200113';
$pandora_version = 'v7.0NG.742';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php
index 5bda3bac1a..2f7ff3433f 100644
--- a/pandora_console/include/functions_agents.php
+++ b/pandora_console/include/functions_agents.php
@@ -146,7 +146,7 @@ function agents_get_next_contact_time_left(int $id_agente)
if ($id_agente > 0) {
$last_contact = db_get_value_sql(
sprintf(
- 'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val"
+ 'SELECT CAST(intervalo AS SIGNED) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto >= ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val"
FROM `tagente`
WHERE id_agente = %d ',
$id_agente
diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php
index 6a79096175..5789764a3a 100644
--- a/pandora_console/include/functions_cron.php
+++ b/pandora_console/include/functions_cron.php
@@ -551,8 +551,9 @@ function cron_list_table()
$report_per_agent = $args[0];
$report_name = $args[3];
$email = $args[4];
- $data[2] .= '
- '.__('Template').": ".$template['name'].'';
+ $data[2] .= '
- '.__('Template').': ';
+ $data[2] .= '';
+ $data[2] .= $template['name'].'';
$data[2] .= '
- '.__('Agents').': '.$agents_id.'';
$data[2] .= '
- '.__('Report per agent').': '.$report_per_agent.'';
$data[2] .= '
- '.__('Report name').': '.$report_name.'';
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 031e586c1d..0ca66bbe73 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -321,7 +321,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
$output = '
'.html_print_image($icon_image, true, false, false, false, true).' | +'.html_print_image($icon_image, true, false, false, false, false).' | '.$text_title.' | ';
if (!$no_close_bool) {
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 854974ac00..8f532b8d49 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
'operation/agentes/ver_agente',
'interval' => (100 / $agent['intervalo']),
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index dcb62c2bda..9fa43c0c4c 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.742
-%define release 200110
+%define release 200113
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index ff62edb941..ef10bfd09b 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.742
-%define release 200110
+%define release 200113
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index 986400935b..fcd4711479 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.742
-%define release 200110
+%define release 200113
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index ced4c08a98..9e1fab4a17 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-server
-Version: 7.0NG.742-200110
+Version: 7.0NG.742-200113
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index b68ed21a7a..f19f0a57ed 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/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.742-200110"
+pandora_version="7.0NG.742-200113"
package_cpan=0
package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 5cee1f0934..3147ee1b91 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.742";
-my $pandora_build = "200110";
+my $pandora_build = "200113";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index cff02dc3ea..243ec8210d 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.742";
-my $pandora_build = "200110";
+my $pandora_build = "200113";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 8acae1b0b4..6ce68748b8 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.742
-%define release 200110
+%define release 200113
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 5beef39208..7bed1022d4 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.742
-%define release 200110
+%define release 200113
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 3993c9aff4..25a89cfce6 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.742"
-PI_BUILD="200110"
+PI_BUILD="200113"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 4da8b67f13..1092e461f5 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.742 PS200110";
+my $version = "7.0NG.742 PS200113";
# Pandora server configuration
my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index d2fa6f2f5b..221d99dbb1 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.742 PS200110";
+my $version = "7.0NG.742 PS200113";
# save program name for logging
my $progname = basename($0);
|