mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
fix sometimes not working redirect to login page (session could not be verified), because inline script is not allowed by our content-security-policy, redirecting top window now in login.js
This commit is contained in:
parent
9a7cbb062c
commit
0ffe6fcb12
@ -331,12 +331,7 @@ class egw extends egw_minimal
|
||||
if (egw_session::get_sessionid()) $redirect .= 'cd=10&';
|
||||
}
|
||||
if ($relpath) $redirect .= 'phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : ''));
|
||||
//Header('Location: '.$GLOBALS['egw_info']['server']['webserver_url'].$redirect);
|
||||
// do NOT redirect, but set top.location, as this works in framed template too
|
||||
$redirect = $GLOBALS['egw_info']['server']['webserver_url'].$redirect;
|
||||
|
||||
echo "<html>\n<head>\n<script type='text/javascript'>top.location='$redirect';</script>\n</head>\n";
|
||||
exit;
|
||||
self::redirect_link($redirect);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/* if login page is not in top window, set top windows location to it */
|
||||
if (top !== window) top.location = window.location;
|
||||
|
||||
egw_LAB.wait(function()
|
||||
{
|
||||
$j(document).ready(function()
|
||||
|
Loading…
Reference in New Issue
Block a user