[java-idp-testbed] branch master updated: IDP-1018 - Revert use of raw query string param for CAS ticket

Tom Zeller tzeller at dragonacea.biz
Fri Sep 2 19:26:40 EDT 2016


This is an automated email from the git hooks/post-receive script.

tzeller pushed a commit to branch master
in repository java-idp-testbed.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-testbed.git;a=commit;h=31c88f5171a3adc75ce0d0a7fca2894de761a77d

The following commit(s) were added to refs/heads/master by this push:
       new  31c88f5   IDP-1018 - Revert use of raw query string param for CAS ticket
31c88f5 is described below

commit 31c88f5171a3adc75ce0d0a7fca2894de761a77d
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Fri Sep 2 18:26:30 2016 -0500

    IDP-1018 - Revert use of raw query string param for CAS ticket
---
 src/main/java/sp/CASController.java | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/src/main/java/sp/CASController.java b/src/main/java/sp/CASController.java
index 920c259..1c46608 100644
--- a/src/main/java/sp/CASController.java
+++ b/src/main/java/sp/CASController.java
@@ -35,7 +35,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import net.shibboleth.idp.cas.protocol.ProtocolParam;
 import net.shibboleth.utilities.java.support.collection.Pair;
 import net.shibboleth.utilities.java.support.net.HttpServletSupport;
-import net.shibboleth.utilities.java.support.net.URISupport;
 import net.shibboleth.utilities.java.support.net.URLBuilder;
 
 @Controller
@@ -94,7 +93,7 @@ public class CASController {
 
         final URLBuilder urlBuilder = new URLBuilder(endpointURL);
 
-        final String ticket = getRawParamValue(servletRequest, ProtocolParam.Ticket.id());
+        final String ticket = servletRequest.getParameter(ProtocolParam.Ticket.id());
 
         final List<Pair<String, String>> queryParams = urlBuilder.getQueryParams();
         queryParams.add(new Pair<String, String>(ProtocolParam.Service.id(), baseUrl + casSPServicePath));
@@ -127,18 +126,4 @@ public class CASController {
             return "http://localhost:8080";
         }
     }
-
-    /**
-     * Get raw parameter value from query string.
-     * 
-     * @param servletRequest
-     * @param paramName parameter name
-     * @return the raw parameter value
-     */
-    private String getRawParamValue(HttpServletRequest servletRequest, String paramName) {
-        final String queryString = servletRequest.getQueryString();
-        final String rawParam = URISupport.getRawQueryStringParameter(queryString, paramName);
-        final String[] params = rawParam.split("=", 2);
-        return params[1];
-    }
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list