[Svn] r3040 - trunk/roundcubemail

trac at roundcube.net trac at roundcube.net
Wed Oct 14 10:36:03 CEST 2009


Author: alec
Date: 2009-10-14 03:36:02 -0500 (Wed, 14 Oct 2009)
New Revision: 3040

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/index.php
Log:
- Fix login page loading into an iframe when session expires (#1485952)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-10-14 06:55:57 UTC (rev 3039)
+++ trunk/roundcubemail/CHANGELOG	2009-10-14 08:36:02 UTC (rev 3040)
@@ -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)

Modified: trunk/roundcubemail/index.php
===================================================================
--- trunk/roundcubemail/index.php	2009-10-14 06:55:57 UTC (rev 3039)
+++ trunk/roundcubemail/index.php	2009-10-14 08:36:02 UTC (rev 3040)
@@ -142,7 +142,7 @@
 
 // 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 @@
 
 // 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"),

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list