Author: theute
Date: 2011-04-20 07:30:50 -0400 (Wed, 20 Apr 2011)
New Revision: 6301
Modified:
epp/sso/branches/1.0-epp-5.0-Branch/agent/src/main/java/org/gatein/sso/agent/filter/AbstractLogoutFilter.java
Log:
JBEPP-896: Character encoding incorrect with SSO enabled
Modified:
epp/sso/branches/1.0-epp-5.0-Branch/agent/src/main/java/org/gatein/sso/agent/filter/AbstractLogoutFilter.java
===================================================================
---
epp/sso/branches/1.0-epp-5.0-Branch/agent/src/main/java/org/gatein/sso/agent/filter/AbstractLogoutFilter.java 2011-04-20
11:27:07 UTC (rev 6300)
+++
epp/sso/branches/1.0-epp-5.0-Branch/agent/src/main/java/org/gatein/sso/agent/filter/AbstractLogoutFilter.java 2011-04-20
11:30:50 UTC (rev 6301)
@@ -22,6 +22,7 @@
package org.gatein.sso.agent.filter;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@@ -38,6 +39,7 @@
public abstract class AbstractLogoutFilter implements Filter
{
protected String logoutUrl;
+ private static final String fileEncoding =
System.getProperty("file.encoding");
public void init(FilterConfig config) throws ServletException
{
@@ -76,8 +78,13 @@
chain.doFilter(request, response);
}
- private boolean isLogoutInProgress(HttpServletRequest request)
+ private boolean isLogoutInProgress(HttpServletRequest request) throws
UnsupportedEncodingException
{
+ // set character encoding before retrieving request parameters
+ if(fileEncoding!=null)
+ {
+ request.setCharacterEncoding(fileEncoding);
+ }
String action = request.getParameter("portal:action");
if (action != null && action.equals("Logout"))
Show replies by date