aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-07-05 11:29:55 +0200
committerGitHub <noreply@github.com>2016-07-05 11:29:55 +0200
commitb77fcc19d4fe26841a54c742cb319595ea84f771 (patch)
tree512f6fdf1df96d8730e1499a19ed458c6040ef82 /apps/user_ldap
parentd2d99a91a0bb47ab4f2116692f363b90a736711b (diff)
parente901ec494134675f0bcc1489daf26b516ceb615e (diff)
downloadnextcloud-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.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) {