summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Access.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-01-25 17:10:51 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-01-25 17:10:51 +0100
commit03ae7b654f62a37cc3fd637ab4f971128163f22a (patch)
tree0bfbbf63084192d3bce88690d97562c2dd404610 /apps/user_ldap/lib/Access.php
parentf469b3e9587e9eae2cce924241f90baa1da30b31 (diff)
downloadnextcloud-server-03ae7b654f62a37cc3fd637ab4f971128163f22a.tar.gz
nextcloud-server-03ae7b654f62a37cc3fd637ab4f971128163f22a.zip
Gracefully deny users or groups with too long DNs
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/Access.php')
-rw-r--r--apps/user_ldap/lib/Access.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index cace64a7deb..9f6639c0db0 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -678,6 +678,9 @@ class Access extends LDAPUtility implements IUserTools {
*/
public function cacheUserDisplayName($ocName, $displayName, $displayName2 = '') {
$user = $this->userManager->get($ocName);
+ if($user === null) {
+ return;
+ }
$displayName = $user->composeAndStoreDisplayName($displayName, $displayName2);
$cacheKeyTrunk = 'getDisplayName';
$this->connection->writeToCache($cacheKeyTrunk.$ocName, $displayName);