Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-04-14 16:07:25 +0300
committerGitHub <noreply@github.com>2022-04-14 16:07:25 +0300
commit0824f440f0007bdf1665e4a8d5b9fc482e235e9f (patch)
tree27883731d4ea2c33e2c85914606da1e2c4dd8b1f /apps/dav/lib/Connector/Sabre
parent3ca797129ced4546d4b3d0c5e84a1871decca55c (diff)
parent1bac5e2cbe17a3f7accb203a5baf4f8809ceef16 (diff)
Merge pull request #31886 from nextcloud/bugfix/noid/principal-search-case-insensitive-dn
Principal search by display name case insensitive
Diffstat (limited to 'apps/dav/lib/Connector/Sabre')
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index 8002f963798..c3f06f95783 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -347,9 +347,10 @@ class Principal implements BackendInterface {
if (!$allowEnumeration) {
if ($allowEnumerationFullMatch) {
+ $lowerSearch = strtolower($value);
$users = $this->userManager->searchDisplayName($value, $searchLimit);
- $users = \array_filter($users, static function (IUser $user) use ($value) {
- return $user->getDisplayName() === $value;
+ $users = \array_filter($users, static function (IUser $user) use ($lowerSearch) {
+ return strtolower($user->getDisplayName()) === $lowerSearch;
});
} else {
$users = [];