summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-28 07:55:20 +0000
committeralecpl <alec@alec.pl>2008-11-28 07:55:20 +0000
commitb2265aea867124e201e7883ac16df05dd446fae5 (patch)
tree5ddd8e818437850ca5c70fa00a8e7418dfa12a5b /index.php
parent9abd0f0089db877d2f6ec9f3a0b978ef3f11ce86 (diff)
#1485584: display proper warning on login with empty user and pass
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index 92223d22f..8b31f9987 100644
--- a/index.php
+++ b/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();
}
}