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:
Ralf Becker 2015-07-04 07:53:50 +00:00
parent 4562b53b1b
commit 7eff188dcf
2 changed files with 4 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -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()