diff options
author | Marco Ceppi <marco@ceppi.net> | 2014-01-23 05:02:07 -0800 |
---|---|---|
committer | Marco Ceppi <marco@ceppi.net> | 2014-01-23 05:02:07 -0800 |
commit | 654dd027437960f7e5fc261fd9ebff2a4efcaf89 (patch) | |
tree | fc43079c7f22a1336c675b0d3eea1eb2a8a1b603 /Auth | |
parent | 62f17268670c0859e7946a31303a06a0aa23ee67 (diff) | |
parent | f97f69afcc6b07ab718618e6041d23c1a2e889a5 (diff) | |
download | php-openid-654dd027437960f7e5fc261fd9ebff2a4efcaf89.zip php-openid-654dd027437960f7e5fc261fd9ebff2a4efcaf89.tar.gz php-openid-654dd027437960f7e5fc261fd9ebff2a4efcaf89.tar.bz2 |
Merge pull request #117 from marcoceppi/xml-sad-face
Reject OpenID XML responses with a doctype
Diffstat (limited to 'Auth')
-rw-r--r-- | Auth/Yadis/XML.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Auth/Yadis/XML.php b/Auth/Yadis/XML.php index 39a9942..2b8a20e 100644 --- a/Auth/Yadis/XML.php +++ b/Auth/Yadis/XML.php @@ -250,6 +250,10 @@ class Auth_Yadis_dom extends Auth_Yadis_XMLParser { return false; } + if (isset($this->doc->doctype)) { + return false; + } + $this->xpath = new DOMXPath($this->doc); if ($this->xpath) { @@ -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)) @@ -357,7 +361,7 @@ function Auth_Yadis_getXMLParser() return $p; } } - + return false; } |