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 9e0d8fcf41
commit e901ec4941
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) {