Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Better fix for login redirect, don't force mail task

  • Loading branch information...
commit 32234d71d3e7817607ba97f76b7d22b1999a0982 1 parent 8ec1b91
Thomas B. authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. 9  index.php
9  index.php
@@ -105,11 +105,16 @@
105 105
 
106 106
     // restore original request parameters
107 107
     $query = array();
108  
-    if ($url = get_input_value('_url', RCUBE_INPUT_POST))
  108
+    if ($url = get_input_value('_url', RCUBE_INPUT_POST)) {
109 109
       parse_str($url, $query);
  110
+      
  111
+      // prevent endless looping on login page
  112
+      if ($query['_task'] == 'login')
  113
+        unset($query['_task']);
  114
+    }
110 115
 
111 116
     // allow plugins to control the redirect url after login success
112  
-    $redir = $RCMAIL->plugins->exec_hook('login_after', array('_task' => 'mail') + $query);
  117
+    $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail'));
113 118
     unset($redir['abort']);
114 119
 
115 120
     // send redirect

0 notes on commit 32234d7

Please sign in to comment.
Something went wrong with that request. Please try again.