diff options
author | felixboehm <felix@webhippie.de> | 2016-07-04 14:16:13 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-07-04 14:22:49 +0200 |
commit | 325776eaf2a744cbc1569450781d202451d3feec (patch) | |
tree | 9f89ff3ca17ed915a9a476afa0452b635e9e9d51 | |
parent | 44a8a1365560888bc712062b79024e6d4218d4c0 (diff) | |
download | nextcloud-server-325776eaf2a744cbc1569450781d202451d3feec.tar.gz nextcloud-server-325776eaf2a744cbc1569450781d202451d3feec.zip |
check if renamed user is still valid by reapplying the ldap filter (#25338)
-rw-r--r-- | apps/user_ldap/lib/User_LDAP.php | 4 |
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) { |