aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-22 16:36:42 -0800
committerFriendika <info@friendika.com>2010-11-22 16:36:42 -0800
commit1b14c1733ba9fcd016eb7c8ed79a25633a5d08ae (patch)
tree8a008d63ba775b2b91f403095b668853c94c54e5
parentfb58801aa406d1dd250d614b02f63f0b72bae6b6 (diff)
downloadvolse-hubzilla-1b14c1733ba9fcd016eb7c8ed79a25633a5d08ae.tar.gz
volse-hubzilla-1b14c1733ba9fcd016eb7c8ed79a25633a5d08ae.tar.bz2
volse-hubzilla-1b14c1733ba9fcd016eb7c8ed79a25633a5d08ae.zip
relax content-type check on yadi discovery document
-rw-r--r--library/openid.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/openid.php b/library/openid.php
index 7c88c02d8..eec652bb1 100644
--- a/library/openid.php
+++ b/library/openid.php
@@ -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');