Skip to content

Commit

Permalink
Added the following patch from the dev@openidenabled.com mailing list:
Browse files Browse the repository at this point in the history
http://lists.openidenabled.com/pipermail/dev/attachments/20090206/f0d91666/attachment-0001.bin

Original Message:
will at willnorris.com will at willnorris.com
Fri Feb 6 14:56:12 PST 2009
darcs patch: Properly handle Yadis discovery failure

	"The library does not curently handle failures during Yadis discovery properly. Specifically, if Yadis discovery fails, and discovery WAS being done with an XRDS document, then non-Yadis discovery should be attempted.

	The use-case I'm dealing with right now that exposes this bug is when an XRDS document location is advertised (via HTTP response header or <meta /> HTML tag), but the document is not able to be retrieved for whatever reason.  The library is failing in this case, instead of continuing to attempt non-Yadis discovery.

	This patch includes two changes:

	- change to Yadis/Yadis.php that properly detects if XRDS was used

	- change to OpenID/Discovery.php that prevents discovery from halting in the
		above example"

This patch was in the form of a Darcs patch, not a normal patch.  So solve this, I applied it to the Darcs repository found on openidenabled, then created a new diff file between the original Darcs repo and the new one (with the patch applied) so that I could apply it to this git repo.

All hunks were applied successfully.
  • Loading branch information
Lilli committed Feb 12, 2010
1 parent 8f98800 commit a6b4f08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Auth/OpenID/Discover.php
Expand Up @@ -496,7 +496,7 @@ function Auth_OpenID_discoverWithYadis($uri, &$fetcher,
$yadis_url = $response->normalized_uri;
$yadis_services = array();

if ($response->isFailure()) {
if ($response->isFailure() && !$response->isXRDS()) {
return array($uri, array());
}

Expand Down
2 changes: 1 addition & 1 deletion Auth/Yadis/Yadis.php
Expand Up @@ -105,7 +105,7 @@ function services()
function usedYadisLocation()
{
// Was the Yadis protocol's indirection used?
return $this->normalized_uri != $this->xrds_uri;
return ($this->xrds_uri && $this->normalized_uri != $this->xrds_uri);
}

function isXRDS()
Expand Down

0 comments on commit a6b4f08

Please sign in to comment.