diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-28 07:55:20 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-28 07:55:20 +0000 |
| commit | ca463f7c5d25fc4b95ef6286323a081f71bccd08 (patch) | |
| tree | 825f5ddceb1815480a948ac5d71c10133c5031d2 | |
| parent | 0a703a900d3aded9ed1249f313ca604bcc360cf0 (diff) | |
#1485584: display proper warning on login with empty user and pass
git-svn-id: https://svn.roundcube.net/trunk@2095 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/index.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/index.php b/roundcubemail/index.php index 92223d22f..8b31f9987 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/index.php @@ -78,7 +78,7 @@ if ($RCMAIL->action=='login' && $RCMAIL->task=='mail') { if (empty($_COOKIE)) { $OUTPUT->show_message("cookiesdisabled", 'warning'); } - else if ($_SESSION['temp'] && !empty($_POST['_user']) && isset($_POST['_pass']) && + else if ($_SESSION['temp'] && !empty($_POST['_user']) && !empty($_POST['_pass']) && $RCMAIL->login(trim(get_input_value('_user', RCUBE_INPUT_POST), ' '), get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'), $host)) { // create new session ID @@ -100,7 +100,7 @@ if ($RCMAIL->action=='login' && $RCMAIL->task=='mail') { $OUTPUT->redirect(); } else { - $OUTPUT->show_message($IMAP->error_code == -1 ? 'loginfailed' : 'imaperror', 'warning'); + $OUTPUT->show_message($IMAP->error_code == 0 ? 'loginfailed' : 'imaperror', 'warning'); $RCMAIL->kill_session(); } } |
