summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2022-05-19 15:41:32 +0200
committerArthur Schiwon (Rebase PR Action) <blizzz@users.noreply.github.com>2023-04-13 19:59:17 +0000
commitf3cd559c540cdb9e128ef08c8750ea282a87f63a (patch)
treebc45aff440f708a1b3aecefedd78e82f6b63a180
parenteecd4601acf4223668eeb4dfb8465e73b873b890 (diff)
downloadnextcloud-server-f3cd559c540cdb9e128ef08c8750ea282a87f63a.tar.gz
nextcloud-server-f3cd559c540cdb9e128ef08c8750ea282a87f63a.zip
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>
-rw-r--r--apps/user_ldap/lib/Access.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index d3510e7a398..9a97a28c376 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -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;
}
}