Skip to content

Commit 6b6739e

Browse files
committed
Had to modify the query for mdr
1 parent 7f6251e commit 6b6739e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OneLogin/Saml/Response.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getNameId()
6262
* AuthnStatement element.
6363
* Using this attribute, the IdP suggests the local session expiration
6464
* time.
65-
*
65+
*
6666
* @return The SessionNotOnOrAfter as unix epoc or NULL if not present
6767
*/
6868
public function getSessionNotOnOrAfter()
@@ -107,14 +107,14 @@ protected function _queryAssertion($assertionXpath)
107107
$xpath->registerNamespace('saml' , 'urn:oasis:names:tc:SAML:2.0:assertion');
108108
$xpath->registerNamespace('ds' , 'http://www.w3.org/2000/09/xmldsig#');
109109

110-
$signatureQuery = '/samlp:Response/saml:Assertion/ds:Signature/ds:SignedInfo/ds:Reference';
110+
$signatureQuery = '/samlp:Response//ds:Signature/ds:SignedInfo/ds:Reference';
111111
$assertionReferenceNode = $xpath->query($signatureQuery)->item(0);
112112
if (!$assertionReferenceNode) {
113113
throw new Exception('Unable to query assertion, no Signature Reference found?');
114114
}
115115
$id = substr($assertionReferenceNode->attributes->getNamedItem('URI')->nodeValue, 1);
116116

117-
$nameQuery = "/samlp:Response/saml:Assertion[@ID='$id']" . $assertionXpath;
117+
$nameQuery = "/samlp:Response/saml:Assertion" . $assertionXpath;
118118
return $xpath->query($nameQuery);
119119
}
120120
}

0 commit comments

Comments
 (0)