You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/11/12 13:22:10 UTC
[3/3] cxf git commit: Strip out any query parameters when sending the
applies to address
Strip out any query parameters when sending the applies to address
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/19607031
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/19607031
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/19607031
Branch: refs/heads/3.1.x-fixes
Commit: 1960703149a11052490cf16ec3682408470298f9
Parents: 822d8f1
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Nov 12 12:14:01 2015 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Nov 12 12:22:03 2015 +0000
----------------------------------------------------------------------
.../cxf/ws/security/trust/STSTokenRetriever.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/19607031/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
index 3b57bda..41556a7 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenRetriever.java
@@ -136,9 +136,16 @@ public final class STSTokenRetriever {
Object o = SecurityUtils.getSecurityPropertyValue(SecurityConstants.STS_APPLIES_TO, message);
String appliesTo = o == null ? null : o.toString();
- appliesTo = appliesTo == null
- ? message.getContextualProperty(Message.ENDPOINT_ADDRESS).toString()
- : appliesTo;
+ if (appliesTo == null) {
+ String endpointAddress =
+ message.getContextualProperty(Message.ENDPOINT_ADDRESS).toString();
+ // Strip out any query parameters if they exist
+ int query = endpointAddress.indexOf('?');
+ if (query > 0) {
+ endpointAddress = endpointAddress.substring(0, query);
+ }
+ appliesTo = endpointAddress;
+ }
boolean enableAppliesTo = client.isEnableAppliesTo();
client.setMessage(message);