From dced9633aa6f5106975a249efbc740b7520ff951 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Mon, 16 Mar 2026 09:56:57 -0100 Subject: [PATCH 1/2] 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 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') From 25f560eed8cb3e6af5ff0fba5152c9a8882d7d07 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Sat, 8 Aug 2026 13:51:03 +0200 Subject: [PATCH 2/2] fix(test): Adapt n.o. calls on backport Signed-off-by: Andy Scherzinger --- tests/lib/Collaboration/Collaborators/LookupPluginTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index 458e486218641..b9e37a43ccab3 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -139,7 +139,7 @@ public function testSearch(array $searchParams): void { ->method('getAppValue') ->with('files_sharing', 'lookupServerEnabled', 'no') ->willReturn('yes'); - $this->config->expects($this->exactly(2)) + $this->config->expects($this->exactly(3)) ->method('getSystemValueBool') ->willReturnMap([ ['gs.enabled', false, true], @@ -202,7 +202,7 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab ->method('addResultSet') ->with($type, $searchParams['expectedResult'], []); - $this->config->expects($this->exactly(2)) + $this->config->expects($this->exactly(3)) ->method('getSystemValueBool') ->willReturnMap([ ['gs.enabled', false, $GSEnabled],