]> source.dussan.org Git - nextcloud-server.git/commitdiff
Ignore whitespace in sharing by mail 21977/head
authoronehappycat <one.happy.cat@gmx.com>
Thu, 23 Jul 2020 20:20:18 +0000 (22:20 +0200)
committeronehappycat <one.happy.cat@gmx.com>
Thu, 23 Jul 2020 20:20:18 +0000 (22:20 +0200)
Signed-off-by: onehappycat <one.happy.cat@gmx.com>
lib/private/Collaboration/Collaborators/Search.php

index c26d5f5541fc789f7f2aa26ef36a8087bb204aa6..8594e87e4a9a901a47cb295b4039b1603d8505e7 100644 (file)
@@ -54,6 +54,9 @@ class Search implements ISearch {
        public function search($search, array $shareTypes, $lookup, $limit, $offset) {
                $hasMoreResults = false;
 
+               // Trim leading and trailing whitespace characters, e.g. when query is copy-pasted
+               $search = trim($search);
+
                /** @var ISearchResult $searchResult */
                $searchResult = $this->c->resolve(SearchResult::class);