diff --git a/README.md b/README.md
index 9077c7dbc3..4d00713cd4 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Pandora FMS gives you the agility to find and solve problems quickly, scaling th
### Support
-For community support you can visit our forums at https://pandorafms.com/community/
+For community support you can visit our forums at https://pandorafms.com/community/
Pandora FMS has a "commercial" solution, with different features, oriented to companies that do not want to spend time using open source solutions, but closed packaged products, with periodic updates and professional support. Its name is Pandora FMS Enterprise, and you can find more information about it at https://pandorafms.com.
@@ -18,11 +18,11 @@ Installing Pandora FMS from sources is a complex task. Please visit our wiki and
### What is Pandora FMS?
-Pandora FMS is an open source monitoring application whose origin dates back to 2004. It integrates in the same application the monitoring of different infrastructure elements: networks, applications, servers, web, and other specific data sources such as logs, WMI, Netflow or SNMP traps.
+Pandora FMS is an open source monitoring application whose origin dates back to 2004. It integrates in the same application the monitoring of different infrastructure elements: networks, applications, servers, web, and other specific data sources such as logs, WMI, Netflow or SNMP traps.
-It allows you to supervise systems and applications of all types, through remote monitoring or with software agents installed on the equipment to be monitored.
+It allows you to supervise systems and applications of all types, through remote monitoring or with software agents installed on the equipment to be monitored.
-Pandora FMS monitors your hardware, software, your multilayer system and, of course, your operating system. Pandora FMS can detect if a network interface is down or the movement of the market value of any new NASDAQ technology. If desired, Pandora FMS can send an SMS message when your system or application fails or when the value of Tesla's stock drops below $180. Pandora FMS will adapt to your systems and requirements, because it has been designed to be open, modular, multiplatform and easy to customize.
+Pandora FMS monitors your hardware, software, your multilayer system and, of course, your operating system. Pandora FMS can detect if a network interface is down or the movement of the market value of any new NASDAQ technology. If desired, Pandora FMS can send an SMS message when your system or application fails or when the value of Tesla's stock drops below \$180. Pandora FMS will adapt to your systems and requirements, because it has been designed to be open, modular, multiplatform and easy to customize.
Pandora FMS can be deployed over any OS, with specific agents for each platform. There are agents for Windows (2000, XP, 2003), GNU/Linux, Solaris, HP-UX, BSD, AIX, IPSO and OpenWRT. Pandora FMS not only gathers information through its agents, but it can also monitor any hardware system with TCP/IP connectivity, such as load balancing systems, routers, switches or printers, through SNMP and TCP/ICMP checks.
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index a464b2d288..aaba742659 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-240422
+Version: 7.0NG.776-240506
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 9ea3d0f4cb..c2fa12960c 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-240422"
+pandora_version="7.0NG.776-240506"
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 503a7923ae..b784189567 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 => '240422';
+use constant AGENT_BUILD => '240506';
# 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 67b976de1e..ee143f48f4 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 240422
+%define release 240506
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 81c7fcb8a8..543ecf5db8 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 240422
+%define release 240506
%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 ba42b79531..bce5bc22c9 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 240422
+%define release 240506
%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 a2fdf1c9c7..c195e54d12 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 240422
+%define release 240506
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 27fe3760b7..943cfc54f1 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 240422
+%define release 240506
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 1044414ea0..cb23e3bd30 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="240422"
+PI_BUILD="240506"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 2016ed42d3..435fd2861e 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{240422}
+{240506}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 1840bdc537..d02064850c 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 240422")
+#define PANDORA_VERSION ("7.0NG.776 Build 240506")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 4b2ecd6170..c3df89f6c4 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 240422))"
+ VALUE "ProductVersion", "(7.0NG.776(Build 240506))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 684262fa0e..25ad1edcad 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.776-240422
+Version: 7.0NG.776-240506
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 b86606e3bf..570166590b 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-240422"
+pandora_version="7.0NG.776-240506"
package_pear=0
package_pandora=1
diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php
index a5dcf2cb0d..db90fe2fe4 100644
--- a/pandora_console/ajax.php
+++ b/pandora_console/ajax.php
@@ -75,23 +75,19 @@ if (empty($_REQUEST) === true) {
}
// Hash login process.
-if (isset($_GET['loginhash']) === true) {
- $loginhash_data = get_parameter('loginhash_data', '');
- $loginhash_user = str_rot13(get_parameter('loginhash_user', ''));
-
- if ($config['loginhash_pwd'] != ''
- && $loginhash_data == md5(
- $loginhash_user.io_output_password($config['loginhash_pwd'])
- )
- ) {
- db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']);
- $_SESSION['id_usuario'] = $loginhash_user;
- $config['id_user'] = $loginhash_user;
+if (isset($_POST['auth_token']) === true && (bool) $config['JWT_signature'] !== false) {
+ include_once $config['homedir'].'/include/class/JWTRepository.class.php';
+ $jwt = new JWTRepository($config['JWT_signature']);
+ if ($jwt->setToken($_POST['auth_token']) && $jwt->validate()) {
+ $id_user = $jwt->payload()->get('id_user');
+ db_logon($id_user, $_SERVER['REMOTE_ADDR']);
+ $_SESSION['id_usuario'] = $id_user;
+ $config['id_user'] = $id_user;
} else {
include_once 'general/login_page.php';
db_pandora_audit(
AUDIT_LOG_USER_REGISTRATION,
- 'Loginhash failed',
+ 'Login token failed',
'system'
);
while (ob_get_length() > 0) {
diff --git a/pandora_console/composer.json b/pandora_console/composer.json
index 3b05d0f000..8514865f2d 100644
--- a/pandora_console/composer.json
+++ b/pandora_console/composer.json
@@ -28,7 +28,9 @@
"php-di/php-di": "^7.0",
"zircote/swagger-php": "^4.8",
"doctrine/annotations": "^2.0",
- "ramsey/uuid": "^4.7"
+ "ramsey/uuid": "^4.7",
+ "lcobucci/jwt": "^5.2",
+ "lcobucci/clock": "^3.2"
},
"repositories": {
"phpchartjs": {
diff --git a/pandora_console/composer.lock b/pandora_console/composer.lock
index 171c94a267..3ec4ac1312 100644
--- a/pandora_console/composer.lock
+++ b/pandora_console/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "0d777bd9c0ca68c9ec0fe911e71b1b2a",
+ "content-hash": "c7549451bb31a635714731144a995123",
"packages": [
{
"name": "amphp/amp",
@@ -1553,6 +1553,143 @@
},
"time": "2023-11-08T14:08:06+00:00"
},
+ {
+ "name": "lcobucci/clock",
+ "version": "3.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/lcobucci/clock.git",
+ "reference": "6f28b826ea01306b07980cb8320ab30b966cd715"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/lcobucci/clock/zipball/6f28b826ea01306b07980cb8320ab30b966cd715",
+ "reference": "6f28b826ea01306b07980cb8320ab30b966cd715",
+ "shasum": ""
+ },
+ "require": {
+ "php": "~8.2.0 || ~8.3.0",
+ "psr/clock": "^1.0"
+ },
+ "provide": {
+ "psr/clock-implementation": "1.0"
+ },
+ "require-dev": {
+ "infection/infection": "^0.27",
+ "lcobucci/coding-standard": "^11.0.0",
+ "phpstan/extension-installer": "^1.3.1",
+ "phpstan/phpstan": "^1.10.25",
+ "phpstan/phpstan-deprecation-rules": "^1.1.3",
+ "phpstan/phpstan-phpunit": "^1.3.13",
+ "phpstan/phpstan-strict-rules": "^1.5.1",
+ "phpunit/phpunit": "^10.2.3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Lcobucci\\Clock\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Luís Cobucci",
+ "email": "lcobucci@gmail.com"
+ }
+ ],
+ "description": "Yet another clock abstraction",
+ "support": {
+ "issues": "https://github.com/lcobucci/clock/issues",
+ "source": "https://github.com/lcobucci/clock/tree/3.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/lcobucci",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/lcobucci",
+ "type": "patreon"
+ }
+ ],
+ "time": "2023-11-17T17:00:27+00:00"
+ },
+ {
+ "name": "lcobucci/jwt",
+ "version": "5.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/lcobucci/jwt.git",
+ "reference": "0ba88aed12c04bd2ed9924f500673f32b67a6211"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/lcobucci/jwt/zipball/0ba88aed12c04bd2ed9924f500673f32b67a6211",
+ "reference": "0ba88aed12c04bd2ed9924f500673f32b67a6211",
+ "shasum": ""
+ },
+ "require": {
+ "ext-openssl": "*",
+ "ext-sodium": "*",
+ "php": "~8.1.0 || ~8.2.0 || ~8.3.0",
+ "psr/clock": "^1.0"
+ },
+ "require-dev": {
+ "infection/infection": "^0.27.0",
+ "lcobucci/clock": "^3.0",
+ "lcobucci/coding-standard": "^11.0",
+ "phpbench/phpbench": "^1.2.9",
+ "phpstan/extension-installer": "^1.2",
+ "phpstan/phpstan": "^1.10.7",
+ "phpstan/phpstan-deprecation-rules": "^1.1.3",
+ "phpstan/phpstan-phpunit": "^1.3.10",
+ "phpstan/phpstan-strict-rules": "^1.5.0",
+ "phpunit/phpunit": "^10.2.6"
+ },
+ "suggest": {
+ "lcobucci/clock": ">= 3.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Lcobucci\\JWT\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Luís Cobucci",
+ "email": "lcobucci@gmail.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "A simple library to work with JSON Web Token and JSON Web Signature",
+ "keywords": [
+ "JWS",
+ "jwt"
+ ],
+ "support": {
+ "issues": "https://github.com/lcobucci/jwt/issues",
+ "source": "https://github.com/lcobucci/jwt/tree/5.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/lcobucci",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/lcobucci",
+ "type": "patreon"
+ }
+ ],
+ "time": "2023-11-20T21:17:42+00:00"
+ },
{
"name": "monolog/monolog",
"version": "3.5.0",
@@ -2307,6 +2444,54 @@
},
"time": "2021-02-03T23:26:27+00:00"
},
+ {
+ "name": "psr/clock",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/clock.git",
+ "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d",
+ "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0 || ^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Clock\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for reading the clock.",
+ "homepage": "https://github.com/php-fig/clock",
+ "keywords": [
+ "clock",
+ "now",
+ "psr",
+ "psr-20",
+ "time"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/clock/issues",
+ "source": "https://github.com/php-fig/clock/tree/1.0.0"
+ },
+ "time": "2022-11-25T14:36:26+00:00"
+ },
{
"name": "psr/container",
"version": "2.0.2",
@@ -4338,5 +4523,5 @@
"platform-overrides": {
"php": "8.2"
},
- "plugin-api-version": "2.3.0"
+ "plugin-api-version": "2.2.0"
}
diff --git a/pandora_console/extensions/api_checker.php b/pandora_console/extensions/api_checker.php
index 38488fc9e4..557ec82e1b 100755
--- a/pandora_console/extensions/api_checker.php
+++ b/pandora_console/extensions/api_checker.php
@@ -69,38 +69,41 @@ function api_execute(
if (empty($url) === true) {
$url = 'http://'.$ip.$pandora_url.'/include/api.php?';
+ } else {
+ $url_schema = parse_url($url);
+ $url = $url_schema['scheme'].'://'.$url_schema['host'].$pandora_url.'/include/api.php?';
+ }
- if (empty($op) === false) {
- $data['op'] = $op;
- }
+ if (empty($op) === false) {
+ $data['op'] = $op;
+ }
- if (empty($op2) === false) {
- $data['op2'] = $op2;
- }
+ if (empty($op2) === false) {
+ $data['op2'] = $op2;
+ }
- if (empty($id) === false) {
- $data['id'] = $id;
- }
+ if (empty($id) === false) {
+ $data['id'] = $id;
+ }
- if (empty($id2) === false) {
- $data['id2'] = $id2;
- }
+ if (empty($id2) === false) {
+ $data['id2'] = $id2;
+ }
- if (empty($return_type) === false) {
- $data['return_type'] = $return_type;
- }
+ if (empty($return_type) === false) {
+ $data['return_type'] = $return_type;
+ }
- if (empty($other) === false) {
- $data['other_mode'] = $other_mode;
- $data['other'] = $other;
- }
+ if (empty($other) === false) {
+ $data['other_mode'] = $other_mode;
+ $data['other'] = $other;
+ }
- // If token is not reported,use old method.
- if (empty($token) === true) {
- $data['apipass'] = $apipass;
- $data['user'] = $user;
- $data['pass'] = $password;
- }
+ // If token is not reported,use old method.
+ if (empty($token) === true) {
+ $data['apipass'] = $apipass;
+ $data['user'] = $user;
+ $data['pass'] = $password;
}
$url_protocol = parse_url($url)['scheme'];
diff --git a/pandora_console/extensions/db_status.php b/pandora_console/extensions/db_status.php
index d62ea49561..6fc5085e5b 100755
--- a/pandora_console/extensions/db_status.php
+++ b/pandora_console/extensions/db_status.php
@@ -50,14 +50,7 @@ function extension_db_status()
}
ui_print_info_message(
- " - " .
- __('This extension checks the DB is correct. Because sometimes the old DB from a migration has not some fields in the tables or the data is changed.') .
- "
" .
- " - " .
- __('At the moment the checks is for MySQL/MariaDB.') .
- "
" .
- " - " .
- __('User must have Select, Drop, Create and References privileges.')
+ ' - '.__('This extension checks the DB is correct. Because sometimes the old DB from a migration has not some fields in the tables or the data is changed.').'
'.' - '.__('At the moment the checks is for MySQL/MariaDB.').'
'.' - '.__('User must have Select, Drop, Create and References privileges.')
);
echo "