X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=library%2Fopenid.php;h=3c58beb8a5eccb63cc77102094fff4beb128e654;hb=aed28a24f158535cff11a60bad45b0b4fd4ef2ce;hp=7c88c02d82a6a94d38d2f18055ce34144a95a1ce;hpb=5e81c615a4e037e08d82cac8984ecb9e2650029f;p=friendica.git diff --git a/library/openid.php b/library/openid.php index 7c88c02d82..3c58beb8a5 100644 --- a/library/openid.php +++ b/library/openid.php @@ -276,7 +276,7 @@ class LightOpenID protected function request($url, $method='GET', $params=array()) { - if(function_exists('curl_init') && !ini_get('safe_mode')) { + if(function_exists('curl_init') && !ini_get('safe_mode') && (! strlen(ini_get('open_basedir')))) { return $this->request_curl($url, $method, $params); } return $this->request_streams($url, $method, $params); @@ -348,8 +348,8 @@ class LightOpenID } if (isset($headers['content-type']) - && strpos($headers['content-type'], 'application/xrds+xml') !== false - ) { + && ((strpos($headers['content-type'], 'application/xrds+xml') !== false + ) || (strpos($headers['content-type'], 'text/xml') !== false))) { # Found an XRDS document, now let's find the server, and optionally delegate. $content = $this->request($url, 'GET'); @@ -375,7 +375,7 @@ class LightOpenID $server = $server[1]; if (isset($delegate[2])) $this->identity = trim($delegate[2]); $this->version = 2; - +logger('Server: ' . $server); $this->server = $server; return $server; } @@ -419,7 +419,7 @@ class LightOpenID } if (!$content) $content = $this->request($url, 'GET'); - +logger('openid' . $content); # At this point, the YADIS Discovery has failed, so we'll switch # to openid2 HTML discovery, then fallback to openid 1.1 discovery. $server = $this->htmlTag($content, 'link', 'rel', 'openid2.provider', 'href');