Skip to content

Commit c85c85e

Browse files
author
Boy Baukema
committed
Bugfixes after testing
1 parent 20852a0 commit c85c85e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/OneLogin/Saml/Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ private function _queryAssertion($assertionXpath)
8989
$xpath->registerNamespace('saml' , 'urn:oasis:names:tc:SAML:2.0:assertion');
9090
$xpath->registerNamespace('ds' , 'http://www.w3.org/2000/09/xmldsig#');
9191

92-
$signatureQuery = '//ds:Reference[@URI]';
93-
$id = substr($xpath->query($signatureQuery)->item(0)->getAttribute('URI'), 1);
92+
$signatureQuery = '//saml:Assertion/ds:Signature/ds:SignedInfo/ds:Reference';
93+
$id = substr($xpath->query($signatureQuery)->item(0)->attributes->getNamedItem('URI')->nodeValue, 1);
9494

9595
$nameQuery = "/samlp:Response/saml:Assertion[@ID='$id']" . $assertionXpath;
9696
return $xpath->query($nameQuery);

src/OneLogin/Saml/XmlSec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class OneLogin_Saml_XmlSec
2727
public function __construct(OneLogin_Saml_Settings $settings, OneLogin_Saml_Response $response)
2828
{
2929
$this->_settings = $settings;
30-
$this->_document = $response->document;
30+
$this->_document = clone $response->document;
3131
}
3232

3333
/**

0 commit comments

Comments
 (0)