ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1652418 - /webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/validate/SamlAssertionValidator.java
Date Fri, 16 Jan 2015 14:26:47 GMT
Author: coheigea
Date: Fri Jan 16 14:26:47 2015
New Revision: 1652418

URL: http://svn.apache.org/r1652418
Log:
Make sure the audience restriction list is not empty first


Conflicts:
	src/main/java/org/apache/ws/security/saml/ext/AssertionWrapper.java

Modified:
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/validate/SamlAssertionValidator.java

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/validate/SamlAssertionValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/validate/SamlAssertionValidator.java?rev=1652418&r1=1652417&r2=1652418&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/validate/SamlAssertionValidator.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/validate/SamlAssertionValidator.java
Fri Jan 16 14:26:47 2015
@@ -276,7 +276,8 @@ public class SamlAssertionValidator exte
             && assertion.getSaml2().getConditions() != null) {
             org.opensaml.saml2.core.Conditions conditions = 
                 assertion.getSaml2().getConditions();
-            if (conditions != null && conditions.getAudienceRestrictions() != null)
{
+            if (conditions != null && conditions.getAudienceRestrictions() != null
+                && !conditions.getAudienceRestrictions().isEmpty()) {
                 boolean foundAddress = false;
                 for (org.opensaml.saml2.core.AudienceRestriction audienceRestriction 
                     : conditions.getAudienceRestrictions()) {
@@ -301,7 +302,8 @@ public class SamlAssertionValidator exte
             && assertion.getSaml1().getConditions() != null) {
             org.opensaml.saml1.core.Conditions conditions = 
                 assertion.getSaml1().getConditions();
-            if (conditions != null && conditions.getAudienceRestrictionConditions()
!= null) {
+            if (conditions != null && conditions.getAudienceRestrictionConditions()
!= null
+                && !conditions.getAudienceRestrictionConditions().isEmpty()) {
                 boolean foundAddress = false;
                 for (org.opensaml.saml1.core.AudienceRestrictionCondition audienceRestriction

                     : conditions.getAudienceRestrictionConditions()) {



Mime
View raw message