summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-01-19 13:11:47 +0000
committerthomascube <thomas@roundcube.net>2011-01-19 13:11:47 +0000
commit32234d71d3e7817607ba97f76b7d22b1999a0982 (patch)
tree9ad4d53ba891fbca75d73d1e19257998634d49e9
parent8ec1b91bb931dca361944db021e9b3706ad04c06 (diff)
Better fix for login redirect, don't force mail task
-rw-r--r--index.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/index.php b/index.php
index 244d2f9e4..3d57571a4 100644
--- a/index.php
+++ b/index.php
@@ -105,11 +105,16 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
// restore original request parameters
$query = array();
- if ($url = get_input_value('_url', RCUBE_INPUT_POST))
+ if ($url = get_input_value('_url', RCUBE_INPUT_POST)) {
parse_str($url, $query);
+
+ // prevent endless looping on login page
+ if ($query['_task'] == 'login')
+ unset($query['_task']);
+ }
// allow plugins to control the redirect url after login success
- $redir = $RCMAIL->plugins->exec_hook('login_after', array('_task' => 'mail') + $query);
+ $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail'));
unset($redir['abort']);
// send redirect