diff options
-rw-r--r-- | lib/private/Collaboration/Collaborators/Search.php | 3 |
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); |