From 424d27512b6b0e3c8a05d1d05f9502df2e9b549d Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Mon, 16 Mar 2026 09:56:57 -0100 Subject: [PATCH] fix(lookup-server): accept self-signed lus on globalscale Signed-off-by: Maxence Lange --- lib/private/Collaboration/Collaborators/LookupPlugin.php | 5 +++++ tests/lib/Collaboration/Collaborators/LookupPluginTest.php | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php index b65431fe34796..37bbffa4eb474 100644 --- a/lib/private/Collaboration/Collaborators/LookupPlugin.php +++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php @@ -54,11 +54,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')