diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-07-05 11:29:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-05 11:29:55 +0200 |
commit | 1d10d58284c86d9c76da474e2df7e367f27c5f1a (patch) | |
tree | 512f6fdf1df96d8730e1499a19ed458c6040ef82 | |
parent | 3bde47cffe3033e43a8cc9fb7eae062545387658 (diff) | |
parent | aa42d60c5fedd99c7784bfb092cbe3cfa182dec1 (diff) | |
download | nextcloud-server-1d10d58284c86d9c76da474e2df7e367f27c5f1a.tar.gz nextcloud-server-1d10d58284c86d9c76da474e2df7e367f27c5f1a.zip |
Merge pull request #25344 from owncloud/fix-ldap-check-user
check if renamed user is still valid by reapplying the ldap filter
-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) { |