[Svn] r4396 - in trunk/roundcubemail: . program/include

trac at roundcube.net trac at roundcube.net
Thu Jan 6 13:41:16 CET 2011


Author: thomasb
Date: 2011-01-06 06:41:16 -0600 (Thu, 06 Jan 2011)
New Revision: 4396

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/index.php
   trunk/roundcubemail/program/include/rcmail.php
   trunk/roundcubemail/program/include/rcube_template.php
Log:
Make sure an existing session is killed/replaced when submitting login form

Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2011-01-06 11:48:11 UTC (rev 4395)
+++ trunk/roundcubemail/CHANGELOG	2011-01-06 12:41:16 UTC (rev 4396)
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix double-login/session issue (#1487104)
 - Wrap HTML parts with <html><body> and add Doctype declaration (#1487098)
 - Make rcube_autoload silently skip unknown classes (#1487109)
 - Fix charset detection in vcards with encoded values (#1485542)

Modified: trunk/roundcubemail/index.php
===================================================================
--- trunk/roundcubemail/index.php	2011-01-06 11:48:11 UTC (rev 4395)
+++ trunk/roundcubemail/index.php	2011-01-06 12:41:16 UTC (rev 4396)
@@ -104,7 +104,7 @@
     rcmail_log_login();
 
     // restore original request parameters
-    $query = array();
+    $query = array('_task' => 'mail');
     if ($url = get_input_value('_url', RCUBE_INPUT_POST))
       parse_str($url, $query);
 

Modified: trunk/roundcubemail/program/include/rcmail.php
===================================================================
--- trunk/roundcubemail/program/include/rcmail.php	2011-01-06 11:48:11 UTC (rev 4395)
+++ trunk/roundcubemail/program/include/rcmail.php	2011-01-06 12:41:16 UTC (rev 4396)
@@ -208,7 +208,7 @@
     $task = asciiwords($task);
 
     if ($this->user && $this->user->ID)
-      $task = !$task || $task == 'login' ? 'mail' : $task;
+      $task = !$task ? 'mail' : $task;
     else
       $task = 'login';
 

Modified: trunk/roundcubemail/program/include/rcube_template.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_template.php	2011-01-06 11:48:11 UTC (rev 4395)
+++ trunk/roundcubemail/program/include/rcube_template.php	2011-01-06 12:41:16 UTC (rev 4396)
@@ -1059,6 +1059,7 @@
         $host_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off');
         $pass_attrib = $autocomplete > 1 ? array() : array('autocomplete' => 'off');
 
+        $input_task   = new html_hiddenfield(array('name' => '_task', 'value' => 'login'));
         $input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login'));
         $input_tzone  = new html_hiddenfield(array('name' => '_timezone', 'id' => 'rcmlogintz', 'value' => '_default_'));
         $input_url    = new html_hiddenfield(array('name' => '_url', 'id' => 'rcmloginurl', 'value' => $url));
@@ -1109,7 +1110,8 @@
             $table->add(null, $input_host->show(get_input_value('_host', RCUBE_INPUT_GPC)));
         }
 
-        $out = $input_action->show();
+        $out  = $input_task->show();
+        $out .= $input_action->show();
         $out .= $input_tzone->show();
         $out .= $input_url->show();
         $out .= $table->show();

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



More information about the Svn mailing list