summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-01-19 13:11:47 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-01-19 13:11:47 +0000
commit9c1edb8e948dff4728b82538cc31b3865fafa4d7 (patch)
tree7f30ab1374bc67c8a1ff5548b3676beb94ef0bbd
parent457065f98cca7c9bc03493f17961269754609bf0 (diff)
Better fix for login redirect, don't force mail task
git-svn-id: https://svn.roundcube.net/trunk@4428 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/index.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/roundcubemail/index.php b/roundcubemail/index.php
index 244d2f9e4..3d57571a4 100644
--- a/roundcubemail/index.php
+++ b/roundcubemail/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