diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-01-30 16:57:40 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-01-30 17:06:51 +0100 |
commit | 9983e05121686f4b76433b76887396cc7ba2d686 (patch) | |
tree | 98fa5c7fa5711cf5a07104bc9ca2ea93ff47c645 /apps/user_ldap/lib/User_LDAP.php | |
parent | 64e9a1aec09bd24fe411e75df710b99dcb67bc86 (diff) | |
download | nextcloud-server-9983e05121686f4b76433b76887396cc7ba2d686.tar.gz nextcloud-server-9983e05121686f4b76433b76887396cc7ba2d686.zip |
LDAP's checkPassword should only catch when a user was not found, fixes #2431
Also fixes error processing after ldap_search, due to different return format
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/User_LDAP.php')
-rw-r--r-- | apps/user_ldap/lib/User_LDAP.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 448b34524f5..cfd2450a122 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -136,17 +136,16 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn } /** - * Check if the password is correct + * Check if the password is correct without logging in the user + * * @param string $uid The username * @param string $password The password * @return false|string - * - * Check if the password is correct without logging in the user */ public function checkPassword($uid, $password) { try { $ldapRecord = $this->getLDAPUserByLoginName($uid); - } catch(\Exception $e) { + } catch(NotOnLDAP $e) { if($this->ocConfig->getSystemValue('loglevel', Util::WARN) === Util::DEBUG) { \OC::$server->getLogger()->logException($e, ['app' => 'user_ldap']); } |