diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 12fc17b75f..a097917773 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -2757,7 +2757,7 @@ function redirectNode(url, target = "_blank") { if (data.success) { var $input = $("") .attr("type", "hidden") - .attr("name", "token") + .attr("name", "auth_token") .val(data.data); $form.append($input); } diff --git a/pandora_console/index.php b/pandora_console/index.php index 2ac5317691..5aac140c0c 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -755,10 +755,10 @@ if (isset($config['id_user']) === false) { header('Location: '.ui_get_full_url('index.php'.$redirect_url)); exit; // Always exit after sending location headers. - } else if (isset($_POST['token']) === true && (bool) $config['JWT_signature'] !== false) { + } else 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['token']) && $jwt->validate()) { + 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; @@ -956,10 +956,10 @@ if (isset($config['id_user']) === false) { exit(''); } } else { - if (isset($_POST['token']) === true && (bool) $config['JWT_signature'] !== false) { + 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['token']) && $jwt->validate()) { + if ($jwt->setToken($_POST['auth_token']) && $jwt->validate()) { $iduser = $_SESSION['id_usuario']; unset($_SESSION['id_usuario']); unset($iduser);