aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelixboehm <felix@webhippie.de>2016-07-04 14:16:13 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-07-04 14:20:08 +0200
commitaa42d60c5fedd99c7784bfb092cbe3cfa182dec1 (patch)
tree73f8210d8cab5dc0df3cccd6a186eecff007ccef
parent59fc3ff45a98e305ad65069d31fc78081fa88dc6 (diff)
downloadnextcloud-server-aa42d60c5fedd99c7784bfb092cbe3cfa182dec1.tar.gz
nextcloud-server-aa42d60c5fedd99c7784bfb092cbe3cfa182dec1.zip
check if renamed user is still valid by reapplying the ldap filter (#25338)
-rw-r--r--apps/user_ldap/lib/User_LDAP.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php
index 230c82a3045..7929394893b 100644
--- a/apps/user_ldap/lib/User_LDAP.php
+++ b/apps/user_ldap/lib/User_LDAP.php
@@ -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) {