From 8e2f4b0eaad8680fca1faac2e5b0a17a421c48ee Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Thu, 23 Aug 2018 13:57:41 +0200 Subject: [PATCH] Implemented license validation for mobile console --- pandora_console/index.php | 4 ++-- pandora_console/mobile/index.php | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 84f53d6e95..015ab613f9 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -202,9 +202,9 @@ $process_login = false; // Update user password $change_pass = get_parameter_post('renew_password', 0); - -if ($change_pass == 1) { +if ($change_pass == 1) { + $password_old = (string) get_parameter_post ('old_password', ''); $password_new = (string) get_parameter_post ('new_password', ''); $password_confirm = (string) get_parameter_post ('confirm_new_password', ''); diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index 6623965f1a..04fc1ff92e 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -42,6 +42,8 @@ $enterpriseHook = enterprise_include('mobile/include/enterprise.class.php'); $enterpriseHook = enterprise_include('mobile/operation/dashboard.php'); $enterpriseHook = enterprise_include('mobile/operation/home.php'); +$is_mobile=true; + if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) { $query = ''; if (sizeof ($_REQUEST)) @@ -116,6 +118,13 @@ if ($action != "ajax") { } } +if ($user->isLogged()) { + + if (file_exists ("../enterprise/load_enterprise.php")) { + include_once ("../enterprise/load_enterprise.php"); + } +} + switch ($action) { case 'ajax': $parameter1 = $system->getRequest('parameter1', false); @@ -169,6 +178,11 @@ switch ($action) { break; case 'login': if ($user->login() && $user->isLogged()) { + + if (file_exists ("../enterprise/load_enterprise.php")) { + include_once ("../enterprise/load_enterprise.php"); + } + if ($user->isWaitingDoubleAuth()) { if ($user->validateDoubleAuthCode()) { // Logged. Refresh the page @@ -192,6 +206,12 @@ switch ($action) { break; case 'double_auth': if ($user->isLogged()) { + + if (file_exists ("../enterprise/load_enterprise.php")) { + include_once ("../enterprise/load_enterprise.php"); + } + + if ($user->validateDoubleAuthCode()) { $user_language = get_user_language ($system->getConfig('id_user')); if (file_exists ('../include/languages/'.$user_language.'.mo')) { @@ -358,4 +378,8 @@ switch ($action) { } break; } + + + + ?>