check if renamed user is still valid by reapplying the ldap filter (#25338)

This commit is contained in:
felixboehm 2016-07-04 14:16:13 +02:00 committed by Thomas Müller
parent 21bdd3005b
commit fdb0d4ad52
1 changed files with 5 additions and 0 deletions

View File

@ -228,6 +228,11 @@ 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) {