summaryrefslogtreecommitdiffstats
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
commit1d10d58284c86d9c76da474e2df7e367f27c5f1a (patch)
tree512f6fdf1df96d8730e1499a19ed458c6040ef82
parent3bde47cffe3033e43a8cc9fb7eae062545387658 (diff)
parentaa42d60c5fedd99c7784bfb092cbe3cfa182dec1 (diff)
downloadnextcloud-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.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) {