aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2024-03-20 12:30:46 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2024-04-05 16:24:27 +0200
commit659125b3950e7d97cbc8721e9fd5b560e6d41b67 (patch)
treee52f82dfbf7ee0c17ed92b809dce9a6bcd39beea /apps/user_ldap
parent4178d5c0c9327b5fd3fc61f07551fe72205a8844 (diff)
downloadnextcloud-server-659125b3950e7d97cbc8721e9fd5b560e6d41b67.tar.gz
nextcloud-server-659125b3950e7d97cbc8721e9fd5b560e6d41b67.zip
fix(LDAP): escape DN on check-user
the DN has to be escaped differently when used as a base and we were missing it here in the search method call in the check-user command. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Command/CheckUser.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php
index 8805d494800..4e9fefd9b55 100644
--- a/apps/user_ldap/lib/Command/CheckUser.php
+++ b/apps/user_ldap/lib/Command/CheckUser.php
@@ -138,7 +138,8 @@ class CheckUser extends Command {
$attrs = $access->userManager->getAttributes();
$user = $access->userManager->get($uid);
$avatarAttributes = $access->getConnection()->resolveRule('avatar');
- $result = $access->search('objectclass=*', $user->getDN(), $attrs, 1, 0);
+ $baseDn = $this->helper->DNasBaseParameter($user->getDN());
+ $result = $access->search('objectclass=*', $baseDn, $attrs, 1, 0);
foreach ($result[0] as $attribute => $valueSet) {
$output->writeln(' ' . $attribute . ': ');
foreach ($valueSet as $value) {