diff options
author | Sergio Gómez <sergio@uco.es> | 2015-10-11 22:48:05 +0200 |
---|---|---|
committer | Sergio Gómez <sergio@uco.es> | 2015-10-11 22:48:05 +0200 |
commit | c19745b1dcac5deaccac84abcac127258bb791d5 (patch) | |
tree | 46ada844b25c6119052b5218e9b402817a52025a /lib/SimpleSAML/XML/Shib13/AuthnResponse.php | |
parent | 2d06c575a95f5d966d79c5525b28bf71174899c4 (diff) | |
download | simplesamlphp-c19745b1dcac5deaccac84abcac127258bb791d5.zip simplesamlphp-c19745b1dcac5deaccac84abcac127258bb791d5.tar.gz simplesamlphp-c19745b1dcac5deaccac84abcac127258bb791d5.tar.bz2 |
XML data is loaded using SAML2_DOMDocumentFactory class
Diffstat (limited to 'lib/SimpleSAML/XML/Shib13/AuthnResponse.php')
-rw-r--r-- | lib/SimpleSAML/XML/Shib13/AuthnResponse.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/SimpleSAML/XML/Shib13/AuthnResponse.php b/lib/SimpleSAML/XML/Shib13/AuthnResponse.php index d228d81..dad0a6f 100644 --- a/lib/SimpleSAML/XML/Shib13/AuthnResponse.php +++ b/lib/SimpleSAML/XML/Shib13/AuthnResponse.php @@ -56,9 +56,9 @@ class SimpleSAML_XML_Shib13_AuthnResponse { public function setXML($xml) { assert('is_string($xml)'); - $this->dom = new DOMDocument(); - $ok = $this->dom->loadXML(str_replace ("\r", "", $xml)); - if (!$ok) { + try { + $this->dom = SAML2_DOMDocumentFactory::fromString(str_replace ("\r", "", $xml)); + } catch(\Exception $e) { throw new Exception('Unable to parse AuthnResponse XML.'); } } |