summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/index.php b/index.php
index d44e13bb2..89066b58d 100644
--- a/index.php
+++ b/index.php
@@ -2,9 +2,9 @@
/*
+-------------------------------------------------------------------------+
| Roundcube Webmail IMAP Client |
- | Version 0.5 |
+ | Version 0.5.1 |
| |
- | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland |
+ | Copyright (C) 2005-2011, Roundcube Dev. - Switzerland |
| |
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License version 2 |
@@ -104,12 +104,17 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
rcmail_log_login();
// restore original request parameters
- $query = array('_task' => 'mail');
- if ($url = get_input_value('_url', RCUBE_INPUT_POST))
+ $query = array();
+ 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', $query);
+ $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail'));
unset($redir['abort']);
// send redirect