Author: mputz
Date: 2010-07-02 10:26:27 -0400 (Fri, 02 Jul 2010)
New Revision: 13954
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_1/sso/src/main/java/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java
Log:
JBPORTAL-2479: Read file.encoding system property on initialization, set character
encoding before retrieving request parameters
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_1/sso/src/main/java/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java
===================================================================
---
modules/identity/branches/JBP_IDENTITY_BRANCH_1_1/sso/src/main/java/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java 2010-06-30
12:17:57 UTC (rev 13953)
+++
modules/identity/branches/JBP_IDENTITY_BRANCH_1_1/sso/src/main/java/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java 2010-07-02
14:26:27 UTC (rev 13954)
@@ -189,6 +189,18 @@
private String authType = null;
/**
+ * The character encoding set on the request, taken from
+ * the file.encoding system property.
+ */
+ private String fileEncoding = null;
+
+ public CASAuthenticationValve()
+ {
+ super();
+ fileEncoding = System.getProperty("file.encoding");
+ }
+
+ /**
*
* @return
*/
@@ -306,6 +318,12 @@
HttpSession session = httpRequest.getSession();
request.setAttribute("ssoEnabled", "true");
+ // set character encoding before retrieving request parameters
+ if(fileEncoding!=null)
+ {
+ request.setCharacterEncoding(fileEncoding);
+ }
+
String requestURI = request.getRequestURI();
if (isSecuredURI(requestURI)
&& request.getParameter("ticket") == null
Show replies by date