Merge pull request #12901 from owncloud/move-ldap-check-to-manager
Move the Null-Byte LDAP check to the user manager
This commit is contained in:
commit
619dcae7af
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue