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
path: root/apps/dav
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-04-08 11:20:24 +0300
committerVincent Petry <vincent@nextcloud.com>2022-04-08 11:20:24 +0300
commit1bac5e2cbe17a3f7accb203a5baf4f8809ceef16 (patch)
tree72725a046c124963523e63fcac1024b6b7164ee5 /apps/dav
parent69378e15347630cdf4c3c7465a951857926e52ec (diff)
Principal search by display name case insensitive
Adjust principal search to be case insensitive even with exact match. This aligns the behavior to how the search also works in Collaborators/UserPlugin Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/dav')
-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 = [];