From 3d7651c280aaa928ab19bc32b32c1ed8598b43e5 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 17 Dec 2007 14:57:46 +0000 Subject: [PATCH] SAML2:AuthnResponse - Changed getInResponseTo() to use a different xPath approach. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@123 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/XML/SAML20/AuthnResponse.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php index 690eab1f7..db76521b9 100644 --- a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php +++ b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php @@ -358,12 +358,13 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse { $xPath = new DOMXpath($dom); $xPath->registerNamespace('samlp', self::SAML2_PROTOCOL_NS); - $result = $xPath->query('/samlp:Response/@InResponseTo'); - if($result->length === 0) { + $query = 'string(/samlp:Response/@InResponseTo)'; + $result = $xPath->evaluate($query); + if($result === '') { return NULL; } - return $result->item(0)->value; + return $result; } -- GitLab