Skip to content
Snippets Groups Projects
Commit d0624418 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #861 from greezybacon/issue/858


auth: Handle REQUEST_URI not being authoritative

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents d6970162 4c7aaa03
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,6 @@
#CURRENT EXECUTING SCRIPT.
define('THISPAGE', Misc::currentURL());
define('THISURI', $_SERVER['REQUEST_URI']);
# This is to support old installations. with no secret salt.
if(!defined('SECRET_SALT')) define('SECRET_SALT',md5(TABLE_PREFIX.ADMIN_EMAIL));
......
......@@ -49,7 +49,8 @@ require_once(INCLUDE_DIR.'class.csrf.php');
if(!function_exists('staffLoginPage')) { //Ajax interface can pre-declare the function to trap expired sessions.
function staffLoginPage($msg) {
global $ost, $cfg;
$_SESSION['_staff']['auth']['dest']=THISURI;
$_SESSION['_staff']['auth']['dest'] =
'/' . ltrim($_SERVER['REQUEST_URI'], '/');
$_SESSION['_staff']['auth']['msg']=$msg;
require(SCP_DIR.'login.php');
exit;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment