summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoronehappycat <one.happy.cat@gmx.com>2020-07-23 22:20:18 +0200
committeronehappycat <one.happy.cat@gmx.com>2020-07-23 22:20:18 +0200
commite04525c186ffca50e476f14070db13bd33065ef5 (patch)
tree3724932308c2a2c8f577b4d5a6f217c6e03e4b66 /lib
parentce314d948464321bb2fced0941a6345267a40f35 (diff)
downloadnextcloud-server-e04525c186ffca50e476f14070db13bd33065ef5.tar.gz
nextcloud-server-e04525c186ffca50e476f14070db13bd33065ef5.zip
Ignore whitespace in sharing by mail
Signed-off-by: onehappycat <one.happy.cat@gmx.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Collaboration/Collaborators/Search.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php
index c26d5f5541f..8594e87e4a9 100644
--- a/lib/private/Collaboration/Collaborators/Search.php
+++ b/lib/private/Collaboration/Collaborators/Search.php
@@ -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);