Skip to content

Commit 35fdc12

Browse files
author
Matthew Pflueger
committed
Fix queryAssertion to properly locate Assertion
1 parent e05b49d commit 35fdc12

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
target
2+
.idea
3+
java-saml.iml

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.onelogin</groupId>
55
<artifactId>java-saml</artifactId>
6-
<version>1.1</version>
6+
<version>1.1.1</version>
77

88
<properties>
99
<slf4jVersion>1.7.12</slf4jVersion>

src/main/java/com/onelogin/saml/Response.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,9 @@ private NodeList queryAssertion( String assertionXpath) throws XPathExpressionEx
478478
if(nodeList.getLength() > 0){
479479
Node assertionReferenceNode=nodeList.item(0);
480480
String id = assertionReferenceNode.getAttributes().getNamedItem("URI").getNodeValue().substring(1);
481-
nameQuery = "/samlp:Response[@ID='"+ id +"']" + assertionXpath;
482-
}else{
481+
// nameQuery = "/samlp:Response[@ID='"+ id +"']" + assertionXpath;
482+
nameQuery = "/samlp:Response[@ID='"+ id +"']/saml:Assertion" + assertionXpath;
483+
}else{
483484
nameQuery = "/samlp:Response/saml:Assertion" + assertionXpath;
484485
}
485486
}

0 commit comments

Comments
 (0)