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 | b77fcc19d4fe26841a54c742cb319595ea84f771 (patch) | |
tree | 512f6fdf1df96d8730e1499a19ed458c6040ef82 /apps/user_ldap | |
parent | d2d99a91a0bb47ab4f2116692f363b90a736711b (diff) | |
parent | e901ec494134675f0bcc1489daf26b516ceb615e (diff) | |
download | nextcloud-server-b77fcc19d4fe26841a54c742cb319595ea84f771.tar.gz nextcloud-server-b77fcc19d4fe26841a54c742cb319595ea84f771.zip |
Merge pull request #25344 from owncloud/fix-ldap-check-user
check if renamed user is still valid by reapplying the ldap filter
Diffstat (limited to 'apps/user_ldap')
-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) { |