diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-14 08:36:02 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-14 08:36:02 +0000 |
| commit | f9d273644e115884ce101ab4134c2fcac6fe30a5 (patch) | |
| tree | acf5140bcc67bcae167c5455fdcd5f0af291f158 | |
| parent | 0033cad3d366722912342c2d280a6eb93117b521 (diff) | |
- Fix login page loading into an iframe when session expires (#1485952)
git-svn-id: https://svn.roundcube.net/trunk@3040 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/index.php | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index b4a467067..86238b245 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG RoundCube Webmail =========================== +- Fix login page loading into an iframe when session expires (#1485952) - added option 'force_https_port' in 'force_https' plugin (#1486091) - Option 'force_https' replaced by 'force_https' plugin - Fix IE issue with non-UTF-8 characters in AJAX response (#1486159) diff --git a/roundcubemail/index.php b/roundcubemail/index.php index 9e32fc79a..46f8c364e 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/index.php @@ -142,7 +142,7 @@ $request_check_whitelist = array('login'=>1, 'spell'=>1); // check client X-header to verify request origin if ($OUTPUT->ajax_call) { - if (!$RCMAIL->config->get('devel_mode') && rc_request_header('X-RoundCube-Request') != $RCMAIL->get_request_token()) { + if (!$RCMAIL->config->get('devel_mode') && rc_request_header('X-RoundCube-Request') != $RCMAIL->get_request_token() && !empty($RCMAIL->user->ID)) { header('HTTP/1.1 404 Not Found'); die("Invalid Request"); } @@ -155,10 +155,12 @@ else if (!empty($_POST) && !$request_check_whitelist[$RCMAIL->action] && !$RCMAI // not logged in -> show login page if (empty($RCMAIL->user->ID)) { - if ($OUTPUT->ajax_call) $OUTPUT->redirect(array(), 2000); + if (!empty($_REQUEST['_framed'])) + $OUTPUT->command('redirect', $OUTPUT->app->url()); + // check if installer is still active if ($RCMAIL->config->get('enable_installer') && is_readable('./installer/index.php')) { $OUTPUT->add_footer(html::div(array('style' => "background:#ef9398; border:2px solid #dc5757; padding:0.5em; margin:2em auto; width:50em"), |
