From 4be9257efaa12635d5f7b63bb83bcb71a0be9e1a Mon Sep 17 00:00:00 2001 From: Jam Balaya Date: Thu, 16 Jul 2026 09:07:23 +0900 Subject: [PATCH] FIX: OpenID server discovery passes the whole HTTP response array as HTML (#39156) htdocs/core/class/openid.class.php OpenId::GetOpenIDServer() calls: $response = getURLContent(...); // array{http_code,content,...} list($servers, $delegates) = $this->HTML2OpenIDServer($response); but HTML2OpenIDServer($content) runs preg_match_all(..., $content), i.e. it expects the HTML string, not the whole getURLContent() array. On PHP 8 this throws a TypeError (preg_match_all subject must be string), breaking OpenID server discovery; on PHP 7 it silently matches nothing. Pass $response['content']. PHPStan level 10 flagged: Parameter #1 $content of method SimpleOpenID::HTML2OpenIDServer() expects string, array given. Co-authored-by: Laurent Destailleur --- htdocs/core/class/openid.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/openid.class.php b/htdocs/core/class/openid.class.php index 9a0e91c48a7..5f04f6a9a19 100644 --- a/htdocs/core/class/openid.class.php +++ b/htdocs/core/class/openid.class.php @@ -388,7 +388,7 @@ class SimpleOpenID $response = getURLContent($url, 'GET', '', 1, array(), array('http', 'https')); - list($servers, $delegates) = $this->HTML2OpenIDServer($response); + list($servers, $delegates) = $this->HTML2OpenIDServer($response['content']); if (count($servers) == 0) { $this->ErrorStore('OPENID_NOSERVERSFOUND'); return false;