mirror of
https://github.com/nextcloud/server.git
synced 2026-03-07 16:01:08 -05:00
perform exact Ldap search as well to make sure it works for attributes without a substr matching rule
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
parent
eecd4601ac
commit
f3cd559c54
1 changed files with 5 additions and 0 deletions
|
|
@ -1537,14 +1537,19 @@ class Access extends LDAPUtility {
|
|||
}
|
||||
}
|
||||
|
||||
$originalSearch = $search;
|
||||
$search = $this->prepareSearchTerm($search);
|
||||
if (!is_array($searchAttributes) || count($searchAttributes) === 0) {
|
||||
if ($fallbackAttribute === '') {
|
||||
return '';
|
||||
}
|
||||
// wildcards don't work with some attributes
|
||||
$filter[] = $fallbackAttribute . '=' . $originalSearch;
|
||||
$filter[] = $fallbackAttribute . '=' . $search;
|
||||
} else {
|
||||
foreach ($searchAttributes as $attribute) {
|
||||
// wildcards don't work with some attributes
|
||||
$filter[] = $attribute . '=' . $originalSearch;
|
||||
$filter[] = $attribute . '=' . $search;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue