Merge pull request #25344 from owncloud/fix-ldap-check-user

check if renamed user is still valid by reapplying the ldap filter
This commit is contained in:
Vincent Petry 2016-07-05 11:29:55 +02:00 committed by GitHub
commit b77fcc19d4
1 changed files with 4 additions and 0 deletions

View File

@ -228,6 +228,10 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
return false;
}
$newDn = $this->access->getUserDnByUuid($uuid);
//check if renamed user is still valid by reapplying the ldap filter
if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
return false;
}
$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
return true;
} catch (\Exception $e) {