You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/01/04 22:28:03 UTC

svn commit: r1055185 - in /cxf/branches/2.3.x-fixes: ./ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java

Author: dkulp
Date: Tue Jan  4 21:28:03 2011
New Revision: 1055185

URL: http://svn.apache.org/viewvc?rev=1055185&view=rev
Log:
Merged revisions 1055184 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1055184 | dkulp | 2011-01-04 16:26:19 -0500 (Tue, 04 Jan 2011) | 2 lines
  
  [CXF-3218] The SecConv interceptor pre-validates the action.  Skip it in
  the MAPAggregator
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1055184

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=1055185&r1=1055184&r2=1055185&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java (original)
+++ cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java Tue Jan  4 21:28:03 2011
@@ -87,7 +87,8 @@ public class MAPAggregator extends Abstr
     public static final String ADDRESSING_DISABLED = MAPAggregator.class.getName() + ".addressingDisabled";
     public static final String DECOUPLED_DESTINATION = MAPAggregator.class.getName() 
         + ".decoupledDestination";
-
+    public static final String ACTION_VERIFIED = MAPAggregator.class.getName() + ".actionVerified";
+    
     private static final Logger LOG = 
         LogUtils.getL7dLogger(MAPAggregator.class);
     private static final ResourceBundle BUNDLE = LOG.getResourceBundle();
@@ -1160,6 +1161,7 @@ public class MAPAggregator extends Abstr
             if (s == null && headers != null) {
                 s = headers.get(Names.SOAP_ACTION_HEADER.toLowerCase());
             }
+            
             if (maps.getAction() == null || maps.getAction().getValue() == null) {
                 String reason =
                     BUNDLE.getString("MISSING_ACTION_MESSAGE");
@@ -1170,7 +1172,8 @@ public class MAPAggregator extends Abstr
                 valid = false;
             }
             
-            if (s != null && s.size() > 0 && valid) {
+            if (s != null && s.size() > 0 && valid 
+                && !MessageUtils.isTrue(message.get(MAPAggregator.ACTION_VERIFIED))) {
                 String sa = s.get(0);
                 if (sa.startsWith("\"")) {
                     sa = sa.substring(1, sa.lastIndexOf('"'));

Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java?rev=1055185&r1=1055184&r2=1055185&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java (original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java Tue Jan  4 21:28:03 2011
@@ -46,12 +46,14 @@ import org.apache.cxf.phase.AbstractPhas
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.addressing.AddressingPropertiesImpl;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.JAXWSAConstants;
+import org.apache.cxf.ws.addressing.MAPAggregator;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.policy.EndpointPolicy;
@@ -249,6 +251,9 @@ class SecureConversationInInterceptor ex
             endpoint.getService().setInvoker(new STSInvoker());
             ex.put(Endpoint.class, endpoint);
             ex.put(Service.class, endpoint.getService());
+            ex.put(org.apache.cxf.binding.Binding.class, endpoint.getBinding());
+            ex.remove(BindingOperationInfo.class);
+            message.put(MAPAggregator.ACTION_VERIFIED, Boolean.TRUE);
         } catch (Exception exc) {
             throw new Fault(exc);
         }