mirror of
https://github.com/nextcloud/server.git
synced 2026-03-04 18:28:08 +01: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:
committed by
Arthur Schiwon (Rebase PR Action)
parent
eecd4601ac
commit
f3cd559c54
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user