Skip to content

Commit

Permalink
Merge pull request #782 from nextcloud/backport/781/stable22
Browse files Browse the repository at this point in the history
[stable22] verify shareType in params
  • Loading branch information
ArtificialOwl authored Aug 11, 2021
2 parents 7300154 + 0ee4641 commit d65f86f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Collaboration/v2/CollaboratorSearchPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
$fromFrontEnd = true;

// TODO: remove this, using a cleaner way to detect the source of the request
$shareType = $this->request->getParam('shareType');
if (in_array(IShare::TYPE_ROOM, $shareType)) {
$params = $this->request->getParams();
$shareType = $this->getArray('shareType', $params);
if (empty($shareType) || in_array(IShare::TYPE_ROOM, $shareType)) {
$fromFrontEnd = false;
}

Expand Down

0 comments on commit d65f86f

Please sign in to comment.