Skip to content

Commit

Permalink
#1485584: display proper warning on login with empty user and pass
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Nov 28, 2008
1 parent 9abd0f0 commit b2265ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.php
Expand Up @@ -78,7 +78,7 @@
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
Expand All @@ -100,7 +100,7 @@
$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();
}
}
Expand Down

0 comments on commit b2265ae

Please sign in to comment.