Skip to content

Commit 7d95a8b

Browse files
author
Christian Pedersen
committed
Adjustments
1 parent 9d6d799 commit 7d95a8b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/onelogin/saml/xmlsec.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ function __construct($settings, $document) {
4040
*/
4141

4242
function validateNumAssertions(){
43-
$rootNode = $this->doc; //->documentElement->ownerDocument;
43+
$rootNode = $this->document; //->documentElement->ownerDocument;
4444
$assertionNodes = $rootNode->getElementsByTagName('Assertion');
4545
return ($assertionNodes->length == 1);
4646
}
4747

4848
function validateTimestamps(){
49-
$rootNode = $this->doc;
49+
$rootNode = $this->document;
5050
$timestampNodes = $rootNode->getElementsByTagName('Conditions');
5151
for($i=0;$i<$timestampNodes->length;$i++){
5252
$nbAttribute = $timestampNodes->item($i)->attributes->getNamedItem("NotBefore");
@@ -84,12 +84,12 @@ function is_valid() {
8484

8585
$singleAssertion = $this->validateNumAssertions();
8686
if (!$singleAssertion){
87-
throw new Exception("Only ONE SamlAssertion allowed");
87+
throw new Exception("Only one SAMLAssertion allowed");
8888
}
8989

9090
$validTimestamps = $this->validateTimestamps();
9191
if (!$validTimestamps){
92-
throw new Exception("Check your timestamp conditions");
92+
throw new Exception("SAMLAssertion conditions not met");
9393
}
9494

9595
$objKeyInfo = XMLSecEnc::staticLocateKeyInfo($objKey, $objDSig);

0 commit comments

Comments
 (0)