Repository: cxf
Updated Branches:
  refs/heads/master 00b626af5 -> 578a51c1b


Only validate Secured Parts if they have not already been validated


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/578a51c1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/578a51c1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/578a51c1

Branch: refs/heads/master
Commit: 578a51c1ba7f12b35730b0d66ac6b4ab880fb94c
Parents: 00b626a
Author: Colm O hEigeartaigh <[email protected]>
Authored: Tue May 12 15:25:49 2015 +0100
Committer: Colm O hEigeartaigh <[email protected]>
Committed: Tue May 12 15:25:49 2015 +0100

----------------------------------------------------------------------
 .../wss4j/policyvalidators/SecuredPartsPolicyValidator.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/578a51c1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecuredPartsPolicyValidator.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecuredPartsPolicyValidator.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecuredPartsPolicyValidator.java
index 381a2c9..a9a0346 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecuredPartsPolicyValidator.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecuredPartsPolicyValidator.java
@@ -81,6 +81,11 @@ public class SecuredPartsPolicyValidator implements 
SecurityPolicyValidator {
         }
         
         for (AssertionInfo ai : ais) {
+            if (ai.isAsserted()) {
+                // Secured Parts could already have been asserted by one of 
the other validators, if
+                // they are a child of a SupportingToken
+                continue;
+            }
             SignedParts p = (SignedParts)ai.getAssertion();
             ai.setAsserted(true);
             

Reply via email to