From 217dc8e6d53beb62e6aa5ccaed68b86a9282d88e Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 14 Mar 2008 12:28:08 +0000 Subject: [PATCH] #22525 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8432 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/auth/auth_apache.php | 12 +++++++++++- phpBB/includes/auth/auth_db.php | 12 +++++++++++- phpBB/includes/auth/auth_ldap.php | 12 +++++++++++- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index a529c3dc9a..b50f5fcf8f 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -136,6 +136,7 @@
  • [Fix] Warnings if poll title/options exceed maximum characters per post (Bug #22865)
  • [Fix] Do not allow selecting non-authorized groups within memberlist by adjusting URL (Bug #22805 - patch provided by ToonArmy)
  • [Fix] Correctly specify "close report action" (Bug #22685)
  • +
  • [Fix] Display "empty password error" within the login box instead of issuing a general error (Bug #22525)
  • diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php index ed3951dd7b..4581a1bbdb 100644 --- a/phpBB/includes/auth/auth_apache.php +++ b/phpBB/includes/auth/auth_apache.php @@ -48,8 +48,18 @@ function login_apache(&$username, &$password) if (!$password) { return array( - 'status' => LOGIN_BREAK, + 'status' => LOGIN_ERROR_PASSWORD, 'error_msg' => 'NO_PASSWORD_SUPPLIED', + 'user_row' => array('user_id' => ANONYMOUS), + ); + } + + if (!$username) + { + return array( + 'status' => LOGIN_ERROR_USERNAME, + 'error_msg' => 'LOGIN_ERROR_USERNAME', + 'user_row' => array('user_id' => ANONYMOUS), ); } diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 432ae92d21..1a5fd9e418 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -32,8 +32,18 @@ function login_db(&$username, &$password) if (!$password) { return array( - 'status' => LOGIN_BREAK, + 'status' => LOGIN_ERROR_PASSWORD, 'error_msg' => 'NO_PASSWORD_SUPPLIED', + 'user_row' => array('user_id' => ANONYMOUS), + ); + } + + if (!$username) + { + return array( + 'status' => LOGIN_ERROR_USERNAME, + 'error_msg' => 'LOGIN_ERROR_USERNAME', + 'user_row' => array('user_id' => ANONYMOUS), ); } diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php index 472927ace3..d49662fb2d 100644 --- a/phpBB/includes/auth/auth_ldap.php +++ b/phpBB/includes/auth/auth_ldap.php @@ -104,8 +104,18 @@ function login_ldap(&$username, &$password) if (!$password) { return array( - 'status' => LOGIN_BREAK, + 'status' => LOGIN_ERROR_PASSWORD, 'error_msg' => 'NO_PASSWORD_SUPPLIED', + 'user_row' => array('user_id' => ANONYMOUS), + ); + } + + if (!$username) + { + return array( + 'status' => LOGIN_ERROR_USERNAME, + 'error_msg' => 'LOGIN_ERROR_USERNAME', + 'user_row' => array('user_id' => ANONYMOUS), ); }