Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #117 from marcoceppi/xml-sad-face
Reject OpenID XML responses with a doctype
  • Loading branch information
marcoceppi committed Jan 23, 2014
2 parents 62f1726 + f97f69a commit 654dd02
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Auth/Yadis/XML.php
Expand Up @@ -250,6 +250,10 @@ function setXML($xml_string)
return false;
}

if (isset($this->doc->doctype)) {
return false;
}

$this->xpath = new DOMXPath($this->doc);

if ($this->xpath) {
Expand Down Expand Up @@ -343,11 +347,11 @@ function Auth_Yadis_getSupportedExtensions()
function Auth_Yadis_getXMLParser()
{
global $__Auth_Yadis_defaultParser;

if (isset($__Auth_Yadis_defaultParser)) {
return $__Auth_Yadis_defaultParser;
}

foreach(Auth_Yadis_getSupportedExtensions() as $extension => $classname)
{
if (extension_loaded($extension))
Expand All @@ -357,7 +361,7 @@ function Auth_Yadis_getXMLParser()
return $p;
}
}

return false;
}

Expand Down

0 comments on commit 654dd02

Please sign in to comment.