forked from extern/egroupware
explicit redirect target for NTLM auth and reverted unnecessary commit r32251
This commit is contained in:
parent
b0870c8c80
commit
9ebb6a54ca
@ -36,7 +36,14 @@ function check_access(&$account)
|
|||||||
}
|
}
|
||||||
if (!$sessionid)
|
if (!$sessionid)
|
||||||
{
|
{
|
||||||
header('Location: ../../login.php'.(isset($_REQUEST['phpgw_forward']) ? '?'.$_REQUEST['phpgw_forward'] : ''));
|
if (isset($_GET['forward']))
|
||||||
|
{
|
||||||
|
header('Location: '.$_GET['forward']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
header('Location: ../../login.php'.(isset($_REQUEST['phpgw_forward']) ? '?phpgw_forward='.$_REQUEST['phpgw_forward'] : ''));
|
||||||
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
return $sessionid;
|
return $sessionid;
|
||||||
@ -50,12 +57,20 @@ $GLOBALS['egw_info']['flags'] = array(
|
|||||||
// if you move this file somewhere else, you need to adapt the path to the header!
|
// if you move this file somewhere else, you need to adapt the path to the header!
|
||||||
include(dirname(__FILE__).'/../../header.inc.php');
|
include(dirname(__FILE__).'/../../header.inc.php');
|
||||||
|
|
||||||
if ($_REQUEST['phpgw_forward'])
|
if (isset($_GET['forward']))
|
||||||
{
|
{
|
||||||
$forward = '../../'.(isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward']);
|
$forward = $_GET['forward'];
|
||||||
|
$GLOBALS['egw']->session->appsession('referer', 'login', $forward);
|
||||||
|
error_log('stored login-referer='.$forward);
|
||||||
|
}
|
||||||
|
elseif ($_REQUEST['phpgw_forward'])
|
||||||
|
{
|
||||||
|
$forward = '../..'.(isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$forward = '../../index.php';
|
$forward = '../../index.php';
|
||||||
}
|
}
|
||||||
|
// commiting the session, before redirecting might fix racecondition in session creation
|
||||||
|
$GLOBALS['egw']->session->commit_session();
|
||||||
header('Location: '.$forward);
|
header('Location: '.$forward);
|
Loading…
Reference in New Issue
Block a user