diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-03-20 12:30:46 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-04-10 10:05:23 +0000 |
commit | 4d12cd6eacd49752cefb34d79053ff1ec6ea2d84 (patch) | |
tree | efd2514cdeb1499a7bc86ce1f65567b962d9dac0 /apps/user_ldap | |
parent | b392041b425aa9831e06a1fdbcd6c99a81c94f57 (diff) | |
download | nextcloud-server-4d12cd6eacd49752cefb34d79053ff1ec6ea2d84.tar.gz nextcloud-server-4d12cd6eacd49752cefb34d79053ff1ec6ea2d84.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.php | 3 |
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 1174408cb49..9bff10441f1 100644 --- a/apps/user_ldap/lib/Command/CheckUser.php +++ b/apps/user_ldap/lib/Command/CheckUser.php @@ -144,7 +144,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) { |