diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php index ef298180b37fe..9b6e2da94c658 100644 --- a/lib/private/Collaboration/Collaborators/LookupPlugin.php +++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php @@ -51,11 +51,16 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b try { $client = $this->clientService->newClient(); + /** + * @psalm-suppress TypeDoesNotContainType - $isGlobalScaleEnabled always true at this point + * @psalm-suppress RedundantCondition - guard rail in case we re-activate LUS out of GlobalScale + */ $response = $client->get( $lookupServerUrl . '/users?search=' . urlencode($search), [ 'timeout' => 10, 'connect_timeout' => 3, + 'verify' => !($isGlobalScaleEnabled && $this->config->getSystemValueBool('gss.selfsigned.allow', false) === true) ] ); diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index d7d4c87c99cfd..458e486218641 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -144,6 +144,7 @@ public function testSearch(array $searchParams): void { ->willReturnMap([ ['gs.enabled', false, true], ['has_internet_connection', true, true], + ['gss.selfsigned.allow', false, false], ]); $this->config->expects($this->once()) @@ -206,6 +207,7 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab ->willReturnMap([ ['gs.enabled', false, $GSEnabled], ['has_internet_connection', true, true], + ['gss.selfsigned.allow', false, false], ]); $this->config->expects($this->once()) ->method('getSystemValueString')