]> BookStack Code Mirror - bookstack/commitdiff
Updates the OIDC userinfo endpoint request to allow for a `Content-Type` response... 5337/head
authorWes Biggs <redacted>
Tue, 26 Nov 2024 17:21:20 +0000 (11:21 -0600)
committerWes Biggs <redacted>
Tue, 26 Nov 2024 17:21:20 +0000 (11:21 -0600)
app/Access/Oidc/OidcUserinfoResponse.php

index 9aded654e31b7ee7ce754556e5272f0f7b9aaf52..ffcacb8dee86982aa366a04b7b63fcee6f559b3a 100644 (file)
@@ -11,7 +11,7 @@ class OidcUserinfoResponse implements ProvidesClaims
 
     public function __construct(ResponseInterface $response, string $issuer, array $keys)
     {
-        $contentType = $response->getHeader('Content-Type')[0];
+        $contentType = explode(';', $response->getHeader('Content-Type')[0], 2)[0];
         if ($contentType === 'application/json') {
             $this->claims = json_decode($response->getBody()->getContents(), true);
         }