cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Avoid manual use of URLDecoder - thanks to Sergey
Date Mon, 01 Sep 2014 13:29:14 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 7078bdc7f -> 4f9c2beca


Avoid manual use of URLDecoder - thanks to Sergey


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

Branch: refs/heads/master
Commit: 4f9c2becafb618ca7e7a9ff1e4174871d62d06d5
Parents: 7078bdc
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Sep 1 14:28:58 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Sep 1 14:28:58 2014 +0100

----------------------------------------------------------------------
 .../cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java     | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4f9c2bec/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
----------------------------------------------------------------------
diff --git a/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
b/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
index c927588..438f615 100644
--- a/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
+++ b/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
@@ -21,7 +21,6 @@ package org.apache.cxf.fediz.cxf.plugin;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URI;
-import java.net.URLDecoder;
 import java.security.cert.X509Certificate;
 import java.util.Collections;
 import java.util.Date;
@@ -84,7 +83,7 @@ public class FedizRedirectBindingFilter extends AbstractServiceProviderFilter
{
                     params = context.getUriInfo().getQueryParameters();
                 } else if (HttpMethod.POST.equals(httpMethod)) {
                     String strForm = IOUtils.toString(context.getEntityStream());
-                    params = JAXRSUtils.getStructuredParams(strForm, "&", false, false);
+                    params = JAXRSUtils.getStructuredParams(strForm, "&", true, false);
                 }
                 
                 if (isSignInRequired(fedConfig, params)) {
@@ -236,10 +235,7 @@ public class FedizRedirectBindingFilter extends AbstractServiceProviderFilter
{
     private String getResponseToken(FedizContext fedConfig, MultivaluedMap<String, String>
params) 
         throws IOException {
         if (params != null && fedConfig.getProtocol() instanceof FederationProtocol)
{
-            String result = params.getFirst(FederationConstants.PARAM_RESULT);
-            if (result != null) {
-                return URLDecoder.decode(result, "UTF-8");
-            }
+            return params.getFirst(FederationConstants.PARAM_RESULT);
         } else if (params != null && fedConfig.getProtocol() instanceof SAMLProtocol)
{
             return params.getFirst(SAMLSSOConstants.SAML_RESPONSE);
         }


Mime
View raw message