diff options
author | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-12-18 00:28:00 +0000 |
---|---|---|
committer | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-12-18 00:28:00 +0000 |
commit | 619dcae7af6293c84931b231981dd369e5bcafb4 (patch) | |
tree | 37a260132d00c392a4fb49bd1499cb97713e0d5c /lib | |
parent | d83fdd7f9dee17f2eb0c36ad6e268e038ac7386d (diff) | |
parent | f6820406b6a345a28878bbd5336eff331627b1a6 (diff) | |
download | nextcloud-server-619dcae7af6293c84931b231981dd369e5bcafb4.tar.gz nextcloud-server-619dcae7af6293c84931b231981dd369e5bcafb4.zip |
Merge pull request #12901 from owncloud/move-ldap-check-to-manager
Move the Null-Byte LDAP check to the user manager
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/user.php | 3 | ||||
-rw-r--r-- | lib/private/user/manager.php | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index 9a2ea3ef74f..17b84d1f93e 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -212,9 +212,6 @@ class OC_User { * Log in a user and regenerate a new session - if the password is ok */ public static function login($loginname, $password) { - $loginname = str_replace("\0", '', $loginname); - $password = str_replace("\0", '', $password); - session_regenerate_id(true); $result = self::getUserSession()->login($loginname, $password); if ($result) { diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php index 1bc3b51c2ef..2c56ea261d6 100644 --- a/lib/private/user/manager.php +++ b/lib/private/user/manager.php @@ -151,6 +151,9 @@ class Manager extends PublicEmitter implements IUserManager { * @return mixed the User object on success, false otherwise */ public function checkPassword($loginname, $password) { + $loginname = str_replace("\0", '', $loginname); + $password = str_replace("\0", '', $password); + foreach ($this->backends as $backend) { if ($backend->implementsActions(\OC_User_Backend::CHECK_PASSWORD)) { $uid = $backend->checkPassword($loginname, $password); |