diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4fd5136eee..e7c241251a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.775-240122 +Version: 7.0NG.775-240123 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 a84d1c1048..00e1bec872 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.775-240122" +pandora_version="7.0NG.775-240123" 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 1bdfa2c98d..40317705f1 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.775'; -use constant AGENT_BUILD => '240122'; +use constant AGENT_BUILD => '240123'; # 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 9d6bcf8f51..8ed67cacd8 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.775 -%define release 240122 +%define release 240123 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 5b9e48578d..e073b7a1b6 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.775 -%define release 240122 +%define release 240123 %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 8ed84f4eb2..ca44c46126 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.775 -%define release 240122 +%define release 240123 %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 e1ac0c3dd6..857491d509 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.775 -%define release 240122 +%define release 240123 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 710699686d..1491df0b07 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.775 -%define release 240122 +%define release 240123 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 54a64fa46d..0232a6bf8c 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240122" +PI_BUILD="240123" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index efc085bfe6..74ffb7b496 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240122} +{240123} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2a05f4e9ce..8e094eedae 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.775 Build 240122") +#define PANDORA_VERSION ("7.0NG.775 Build 240123") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7600b129ae..b7d17d6756 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.775(Build 240122))" + VALUE "ProductVersion", "(7.0NG.775(Build 240123))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6ba70f63f8..4d832ca478 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.775-240122 +Version: 7.0NG.775-240123 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 69659ab510..95ee569569 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.775-240122" +pandora_version="7.0NG.775-240123" package_pear=0 package_pandora=1 diff --git a/pandora_console/extensions/grafana/index.php b/pandora_console/extensions/grafana/index.php index d46b60d59c..8a02e644cc 100644 --- a/pandora_console/extensions/grafana/index.php +++ b/pandora_console/extensions/grafana/index.php @@ -23,7 +23,10 @@ if ($headers['X-DS-Authorization']) { list($user, $password) = explode(':', base64_decode($headers['X-DS-Authorization'])); - // Check user login + // Prevent sql injection. + $user = mysqli_real_escape_string($config['dbconnection'], $user); + + // Check user login. $user_in_db = process_user_login($user, $password, true); if ($user_in_db !== false) { diff --git a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini index c0cee7d03f..d05611a6b5 100644 --- a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini +++ b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini @@ -1,11 +1,11 @@ pandorafms.vmware=248788e0fb2cd4e11623e4a52ee7d05b pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe pandorafms.mssql=1cc215409741d19080269ffba112810e -pandorafms.oracle=2d9320a514d1e48a0b2804e1653c31c6 +pandorafms.oracle=abdfd7280f76276f696115cabdac731e pandorafms.db2=122f2abff0ec1d668c35ee0911483021 pandorafms.sap.deset=9bb72b7f7497a8b543f25cd71f96878f pandorafms.gcp.ce=6743d39452f8e1ad85d0d56a30843973 pandorafms.aws.ec2=07416081f11d92a7d5d9441dabb5c5cb pandorafms.aws.s3=eff053a212ea112e2a37efd9debbe6a0 pandorafms.aws.rds=47d7b02019329e1698f96db4959f9516 -pandorafms.azure.mc=04a1072d1ece8583645ad88204fbeed3 \ No newline at end of file +pandorafms.azure.mc=04a1072d1ece8583645ad88204fbeed3 diff --git a/pandora_console/extras/mr/68.sql b/pandora_console/extras/mr/68.sql index 21a9a98b14..ed186c4f91 100644 --- a/pandora_console/extras/mr/68.sql +++ b/pandora_console/extras/mr/68.sql @@ -1,5 +1,8 @@ START TRANSACTION; +-- Update version for plugin oracle +UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.oracle'; + ALTER TABLE `tevent_sound` MODIFY COLUMN `name` text NULL; ALTER TABLE `tevent_sound` MODIFY COLUMN `sound` text NULL; ALTER TABLE `treport_content` MODIFY COLUMN `use_prefix_notation` tinyint unsigned NOT NULL DEFAULT 1; @@ -9,7 +12,8 @@ ALTER TABLE `tsesion_filter` MODIFY COLUMN `period` text NULL; ALTER TABLE `tsesion_filter` MODIFY COLUMN `ip` text NULL; ALTER TABLE `tsesion_filter` MODIFY COLUMN `type` text NULL; ALTER TABLE `tsesion_filter` MODIFY COLUMN `user` text NULL; -ALTER TABLE `tncm_agent_data` ADD COLUMN `id_agent_data` int not null default 0 AFTER `script_type`; +ALTER TABLE `tncm_agent_data` +ADD COLUMN `id_agent_data` int not null default 0 AFTER `script_type`; ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ; ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`; diff --git a/pandora_console/godmode/agentes/inventory_manager.php b/pandora_console/godmode/agentes/inventory_manager.php index 3f27c3a6b3..d989b7d560 100644 --- a/pandora_console/godmode/agentes/inventory_manager.php +++ b/pandora_console/godmode/agentes/inventory_manager.php @@ -131,9 +131,13 @@ if ($add_inventory_module) { } } -// Load inventory module data for updating +// Load inventory module data for updating. if ($load_inventory_module) { - $sql = 'SELECT * FROM tagent_module_inventory WHERE id_module_inventory = '.$load_inventory_module; + $sql = sprintf( + 'SELECT * FROM tagent_module_inventory WHERE id_module_inventory = %s AND id_agente = %d', + $load_inventory_module, + $id_agente + ); $row = db_get_row_sql($sql); if (!empty($row)) { diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index cc9ed5d5f0..7a0e4b61e1 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -68,7 +68,7 @@ foreach ($layer_ids as $layer_id) { $layer_list[] = [ 'id' => (strpos($layer_id, 'new_') === false) ? (int) $layer_id : null, 'layer_name' => $trimmed_name, - 'layer_visible' => ($layers[$layer_id]['visible'] === 'true'), + 'layer_visible' => ($layers[$layer_id]['visible'] == 'true' || $layers[$layer_id]['visible'] === '1'), 'layer_group' => (int) $layers[$layer_id]['agents_from_group'], 'layer_agent_list' => $layers[$layer_id]['agents'], 'layer_group_list' => $layers[$layer_id]['groups'], @@ -562,8 +562,6 @@ $table->data[9][1] = html_print_input_text('map_default_altitude', $map_default_ html_print_table($table); -$user_groups = users_get_groups($config['user'], 'AR', false); - echo '
'.__('Layers').''; $table->width = '100%'; @@ -589,7 +587,7 @@ $table->data[1][0] = '