Browse Source

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>
tags/v27.1.9rc1
Arthur Schiwon 2 months ago
parent
commit
cd725ee61a
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      apps/user_ldap/lib/Command/CheckUser.php

+ 2
- 1
apps/user_ldap/lib/Command/CheckUser.php View File

@@ -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) {

Loading…
Cancel
Save