Skip to content

Commit

Permalink
Don't add trailing wildcard in entryUUID search filter because it's n…
Browse files Browse the repository at this point in the history
…ot supported

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
  • Loading branch information
Julien Veyssier committed May 19, 2022
1 parent 2c5d604 commit 5f6fab5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/user_ldap/lib/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,7 @@ private function getFilterPartForSearch(string $search, $searchAttributes, strin
}
}

$originalSearch = $search;
$search = $this->prepareSearchTerm($search);
if (!is_array($searchAttributes) || count($searchAttributes) === 0) {
if ($fallbackAttribute === '') {
Expand All @@ -1541,7 +1542,12 @@ private function getFilterPartForSearch(string $search, $searchAttributes, strin
$filter[] = $fallbackAttribute . '=' . $search;
} else {
foreach ($searchAttributes as $attribute) {
$filter[] = $attribute . '=' . $search;
// wildcards don't not work with entryUUID
if ($attribute === 'entryUUID') {
$filter[] = $attribute . '=' . $originalSearch;
} else {
$filter[] = $attribute . '=' . $search;
}
}
}
if (count($filter) === 1) {
Expand Down

0 comments on commit 5f6fab5

Please sign in to comment.