diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-04-13 22:37:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 22:37:39 +0200 |
commit | 79013bab0a46f0825523eed94121bdd65e0ac511 (patch) | |
tree | bc45aff440f708a1b3aecefedd78e82f6b63a180 | |
parent | eecd4601acf4223668eeb4dfb8465e73b873b890 (diff) | |
parent | f3cd559c540cdb9e128ef08c8750ea282a87f63a (diff) | |
download | nextcloud-server-79013bab0a46f0825523eed94121bdd65e0ac511.tar.gz nextcloud-server-79013bab0a46f0825523eed94121bdd65e0ac511.zip |
Merge pull request #32499 from nextcloud/enh/noid/ldap-search-entryuuid-no-wildcard
Fix Ldap search for attributes with no substr matching rule
-rw-r--r-- | apps/user_ldap/lib/Access.php | 5 |
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; } } |