diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-15 10:13:57 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-15 10:17:43 +0100 |
commit | 33837e7d6fb57d657a197a4f49549d919b1ebc62 (patch) | |
tree | d249515fe35557c93b61a604caaaf796e56b8568 /core/Controller | |
parent | 830d85bcf1dd421717f69f3f22d434d1512e6e0f (diff) | |
download | nextcloud-server-33837e7d6fb57d657a197a4f49549d919b1ebc62.tar.gz nextcloud-server-33837e7d6fb57d657a197a4f49549d919b1ebc62.zip |
Fix invalid users/groups handling in advanced search
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/UnifiedSearchController.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index 87aa84e1d91..5ae99c6a076 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -28,6 +28,7 @@ declare(strict_types=1); */ namespace OC\Core\Controller; +use InvalidArgumentException; use OC\Search\SearchComposer; use OC\Search\SearchQuery; use OCA\Core\ResponseDefinitions; @@ -111,7 +112,7 @@ class UnifiedSearchController extends OCSController { try { $filters = $this->composer->buildFilterList($providerId, $this->request->getParams()); - } catch (UnsupportedFilter $e) { + } catch (UnsupportedFilter|InvalidArgumentException $e) { return new DataResponse($e->getMessage(), Http::STATUS_BAD_REQUEST); } return new DataResponse( |