diff --git a/lib/Lookup.php b/lib/Lookup.php index 973ef06..7ebd08f 100644 --- a/lib/Lookup.php +++ b/lib/Lookup.php @@ -203,7 +203,8 @@ public function configureClient(array $options): array { [ 'timeout' => 10, 'connect_timeout' => 3, - 'nextcloud' => ['allow_local_address' => true] + 'nextcloud' => ['allow_local_address' => true], + 'verify' => !$this->config->getSystemValueBool('gss.selfsigned.allow', false), ] ); } diff --git a/lib/Service/GlobalScaleService.php b/lib/Service/GlobalScaleService.php index edc7d29..200b5a1 100644 --- a/lib/Service/GlobalScaleService.php +++ b/lib/Service/GlobalScaleService.php @@ -91,6 +91,10 @@ public function refreshTokenFromAddress(string $address): void { return; } + if (str_contains($address, '://')) { + $address = parse_url($address, PHP_URL_HOST); + } + $token = $this->getRemotePublicDiscovery($address)['token'] ?? ''; if ($token === '' || strlen($token) < 5) { return;