diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4fec552986..91d97ac889 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.729-181210 +Version: 7.0NG.729-181211 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 3e41fa8411..aee81acb54 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.729-181210" +pandora_version="7.0NG.729-181211" 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 9dc1d6223c..e6070a42d7 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.729'; -use constant AGENT_BUILD => '181210'; +use constant AGENT_BUILD => '181211'; # 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 5d1e0c2729..d4a375c7e7 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.729 -%define release 181210 +%define release 181211 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 f98db0dc4a..745cf21973 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.729 -%define release 181210 +%define release 181211 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 d78b9a021f..1632cf5448 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.729" -PI_BUILD="181210" +PI_BUILD="181211" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5431415815..652c522463 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{181210} +{181211} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 92a0ac3bd6..5cbaba25c9 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.729(Build 181210)") +#define PANDORA_VERSION ("7.0NG.729(Build 181211)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5de93117ea..b4d4b3b4f4 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.729(Build 181210))" + VALUE "ProductVersion", "(7.0NG.729(Build 181211))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2c93228053..9900f8db7e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.729-181210 +Version: 7.0NG.729-181211 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 8361ef879e..8ffb10a322 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.729-181210" +pandora_version="7.0NG.729-181211" package_pear=0 package_pandora=1 diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index 658f7dd9fc..54a0a77d49 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -228,11 +228,11 @@ foreach ($result as $row) { $rowPair = !$rowPair; $data = array(); - $data[0] = $row["id_usuario"]; + $data[0] = io_safe_output($row["id_usuario"]); $data[1] = ui_print_session_action_icon($row["accion"], true) . $row["accion"]; $data[2] = ui_print_help_tip(date($config["date_format"], $row["utimestamp"]), true) . ui_print_timestamp($row["utimestamp"], true); - $data[3] = $row["ip_origen"]; + $data[3] = io_safe_output($row["ip_origen"]); $data[4] = io_safe_output($row["descripcion"]); if ($enterprise_include !== ENTERPRISE_NOT_HOOK) { diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 5f364389ed..fab0ad7637 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -924,9 +924,8 @@ if ($update_agent) { // if modified some agent paramenter enterprise_hook ('update_agent', array ($id_agente)); ui_print_success_message (__('Successfully updated')); - $unsafe_alias = io_safe_output($alias); db_pandora_audit("Agent management", - "Updated agent $unsafe_alias", false, false, $info); + "Updated agent $alias", false, false, $info); } } @@ -1427,7 +1426,7 @@ if ($update_module) { $edit_module = true; db_pandora_audit("Agent management", - "Fail to try update module '".io_safe_output($name)."' for agent " . io_safe_output($agent["alias"])); + "Fail to try update module '$name' for agent " . $agent["alias"]); } else { if ($prediction_module == 3) { @@ -1445,7 +1444,7 @@ if ($update_module) { $agent = db_get_row ('tagente', 'id_agente', $id_agente); db_pandora_audit("Agent management", - "Updated module '".io_safe_output($name)."' for agent ". io_safe_output($agent["alias"]), false, false, io_json_mb_encode($values)); + "Updated module '$name' for agent ".$agent["alias"], false, false, io_json_mb_encode($values)); } } @@ -1586,7 +1585,7 @@ if ($create_module) { $edit_module = true; $moduletype = $id_module; db_pandora_audit("Agent management", - "Fail to try added module '".io_safe_output($name)."' for agent ".io_safe_output($agent["alias"])); + "Fail to try added module '$name' for agent ".$agent["alias"]); } else { if ($prediction_module == 3) { @@ -1604,7 +1603,7 @@ if ($create_module) { $agent = db_get_row ('tagente', 'id_agente', $id_agente); db_pandora_audit("Agent management", - "Added module '".io_safe_output($name)."' for agent ".io_safe_output($agent["alias"]), false, true, io_json_mb_encode($values)); + "Added module '$name' for agent ".$agent["alias"], false, true, io_json_mb_encode($values)); } } @@ -1727,7 +1726,7 @@ if ($delete_module) { // DELETE agent module ! $agent = db_get_row ('tagente', 'id_agente', $id_agente); db_pandora_audit("Agent management", - "Deleted module '".io_safe_output($module_data["nombre"])."' for agent ".io_safe_output($agent["alias"])); + "Deleted module '".$module_data["nombre"]."' for agent ".$agent["alias"]); } @@ -1760,11 +1759,11 @@ if (!empty($duplicate_module)) { // DUPLICATE agent module ! if ($result) { db_pandora_audit("Agent management", - "Duplicate module '".$id_duplicate_module."' for agent " . io_safe_output($agent["alias"]) . " with the new id for clon " . $result); + "Duplicate module '".$id_duplicate_module."' for agent " . $agent["alias"] . " with the new id for clon " . $result); } else { db_pandora_audit("Agent management", - "Fail to try duplicate module '".$id_duplicate_module."' for agent " . io_safe_output($agent["alias"])); + "Fail to try duplicate module '".$id_duplicate_module."' for agent " . $agent["alias"]); } } diff --git a/pandora_console/godmode/events/event_responses.php b/pandora_console/godmode/events/event_responses.php index d06dc0932a..f5e1034563 100644 --- a/pandora_console/godmode/events/event_responses.php +++ b/pandora_console/godmode/events/event_responses.php @@ -16,6 +16,8 @@ global $config; +include_once($config['homedir'] . "/include/functions_event_responses.php"); + check_login (); if (! check_acl($config['id_user'], 0, "PM")) { diff --git a/pandora_console/godmode/massive/massive_add_profiles.php b/pandora_console/godmode/massive/massive_add_profiles.php index 559ffa6291..253992b7f5 100644 --- a/pandora_console/godmode/massive/massive_add_profiles.php +++ b/pandora_console/godmode/massive/massive_add_profiles.php @@ -48,7 +48,7 @@ if ($create_profiles) { // If the profile doesnt exist, we create it if ($profile_data === false) { db_pandora_audit("User management", - "Added profile for user ".io_safe_output($user)); + "Added profile for user ".io_safe_input($user)); $return = profile_create_user_profile ($user, $profile, $group); if ($return !== false) { $n_added ++; diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 1ca83c3682..7482b2fcd3 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -242,7 +242,7 @@ if ($create_user) { } db_pandora_audit("User management", - "Created user ".io_safe_output($id), false, false, $info); + "Created user ".io_safe_input($id), false, false, $info); ui_print_result_message ($result, __('Successfully created'), @@ -392,7 +392,7 @@ if ($update_user) { } - db_pandora_audit("User management", "Updated user ".io_safe_output($id), + db_pandora_audit("User management", "Updated user ".io_safe_input($id), false, false, $info); ui_print_result_message ($res1, @@ -450,7 +450,7 @@ if ($add_profile) { $tags = implode(',', $tags); db_pandora_audit("User management", - "Added profile for user ".io_safe_output($id2), false, false, 'Profile: ' . $profile2 . ' Group: ' . $group2 . ' Tags: ' . $tags); + "Added profile for user ".io_safe_input($id2), false, false, 'Profile: ' . $profile2 . ' Group: ' . $group2 . ' Tags: ' . $tags); $return = profile_create_user_profile($id2, $profile2, $group2, false, $tags, $no_hierarchy); ui_print_result_message ($return, __('Profile added successfully'), @@ -466,7 +466,7 @@ if ($delete_profile) { $perfil = db_get_row('tperfil', 'id_perfil', $id_perfil); db_pandora_audit("User management", - "Deleted profile for user ".io_safe_output($id2), false, false, 'The profile with id ' . $id_perfil . ' in the group ' . $perfilUser['id_grupo']); + "Deleted profile for user ".io_safe_input($id2), false, false, 'The profile with id ' . $id_perfil . ' in the group ' . $perfilUser['id_grupo']); $return = profile_delete_user_profile ($id2, $id_up); ui_print_result_message ($return, diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2d84531297..a99d7b880d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC181210'; +$build_version = 'PC181211'; $pandora_version = 'v7.0NG.729'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 7ce0d2df69..c223738b2a 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -485,8 +485,6 @@ define("OPTION_AGENT_AUTOCOMPLETE", 9); define("OPTION_SELECT_MULTISELECTION", 10); define("OPTION_COLOR_PICKER", 11); -define("DASHBOARD_WIDGET_ID_VISUAL_CONSOLE", 22); - /* Transactional map constants */ define("NODE_TYPE", 0); define("ARROW_TYPE", 1); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 8b25a5b467..d45abda41b 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -159,7 +159,8 @@ function reporting_make_reporting_data($report = null, $id_report, true); $sql_tags_join = "INNER JOIN tagente ON tagente.id_agente = t1.id_agente - INNER JOIN ttag_module ON ttag_module.id_agente_modulo = t1.id_agente_modulo"; + INNER JOIN ttag_module ON ttag_module.id_agente_modulo = t1.id_agente_modulo + LEFT JOIN tagent_secondary_group tasg ON tagente.id_agente = tasg.id_agent"; $sql = sprintf('SELECT count(*) FROM tagente_modulo t1 %s WHERE t1.delete_pending = 0 AND t1.id_agente_modulo = '. $content["id_agent_module"] .' diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index fb339f1886..b6c7647562 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -808,8 +808,11 @@ function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group $tags_condition = $group_condition . " AND (" . implode(" OR ", $tags_condition_array) . ")"; $condition[] = "($tags_condition)\n"; } + if (!empty($condition)) { $condition = implode(' OR ', $condition); + } else { + $condition = ''; } if (!empty($without_tags)) { diff --git a/pandora_console/include/styles/install.css b/pandora_console/include/styles/install.css index 18ccab6663..fe06c7a084 100644 --- a/pandora_console/include/styles/install.css +++ b/pandora_console/include/styles/install.css @@ -252,7 +252,7 @@ div.installation_step { .popup-button-green{ background-color: #82B92E; border: 1px solid transparent; - color: blue; + color: #FFF; } .popup-button-green span{ @@ -262,7 +262,7 @@ div.installation_step { .popup-button-green:hover{ background-color: transparent !important; border: 1px solid #82B92E; - color: red !important; + color: #82B92E !important; } .popup-button-green:hover span{ diff --git a/pandora_console/index.php b/pandora_console/index.php index 776e0d8eb2..10a471d295 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -360,7 +360,7 @@ if (! isset ($config['id_user'])) { if ($blocked) { require_once ('general/login_page.php'); - db_pandora_audit("Password expired", "Password expired: ".io_safe_output($nick), io_safe_output($nick)); + db_pandora_audit("Password expired", "Password expired: ".$nick, $nick); while (@ob_end_flush ()); exit (""); } @@ -383,7 +383,7 @@ if (! isset ($config['id_user'])) { require_once ('general/login_page.php'); db_pandora_audit("Password expired", - "Password expired: " . io_safe_output($nick), $nick); + "Password expired: " . $nick, $nick); while (@ob_end_flush ()); exit (""); } @@ -541,20 +541,20 @@ if (! isset ($config['id_user'])) { if ((!is_user_admin($nick) || $config['enable_pass_policy_admin']) && file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { $blocked = login_check_blocked($nick); } - $nick_usable = io_safe_output($nick); + if (!$blocked) { if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { login_check_failed($nick); //Checks failed attempts } $login_failed = true; require_once ('general/login_page.php'); - db_pandora_audit("Logon Failed", "Invalid login: ".$nick_usable, $nick_usable); + db_pandora_audit("Logon Failed", "Invalid login: ".$nick, $nick); while (@ob_end_flush ()); exit (""); } else { require_once ('general/login_page.php'); - db_pandora_audit("Logon Failed", "Invalid login: ".$nick_usable, $nick_usable); + db_pandora_audit("Logon Failed", "Invalid login: ".$nick, $nick); while (@ob_end_flush ()); exit (""); } diff --git a/pandora_console/install.php b/pandora_console/install.php index 88df758098..fd147ea49e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -33,6 +33,9 @@ @@ -87,12 +103,12 @@ Warning close -