summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-24 13:37:36 +0200
committerGitHub <noreply@github.com>2020-07-24 13:37:36 +0200
commit15561b4e0a5fdf64221ed464bda7d65f21d85053 (patch)
treec10c7c8207c99e99febafcb1ec9373725e1f48f7 /lib
parent1326862d6350baa3af28b6714a50e30442c65f7e (diff)
parente04525c186ffca50e476f14070db13bd33065ef5 (diff)
downloadnextcloud-server-15561b4e0a5fdf64221ed464bda7d65f21d85053.tar.gz
nextcloud-server-15561b4e0a5fdf64221ed464bda7d65f21d85053.zip
Merge pull request #21977 from onehappycat/issue_21960
Ignore whitespace in sharing by mail
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);