[seam-issues] [JBoss JIRA] Created: (JBSEAM-4605) Token based remember me does not work, if context root is /

Dieter Rehbein (JIRA) jira-events at lists.jboss.org
Fri Mar 19 06:36:37 EDT 2010


Token based remember me does not work, if context root is /
-----------------------------------------------------------

                 Key: JBSEAM-4605
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4605
             Project: Seam
          Issue Type: Bug
          Components: Security
    Affects Versions: 2.2.0.GA
            Reporter: Dieter Rehbein


If you have an .ear file containing a web-application with context-root "/", token based remember me does not work. 


The reason:  

the method getCookiePath() of org.jboss.seam.security.RememberMe returns an empty string, if context-root is "/".

To fix this, the following change in class RememberMe is required:

change

   public String getCookiePath()
   {
      FacesContext ctx = FacesContext.getCurrentInstance();
      return ctx != null ? ctx.getExternalContext().getRequestContextPath() : null;
   }


to 

   public String getCookiePath()
   {
      FacesContext ctx = FacesContext.getCurrentInstance();
      String cookiePath = ctx != null ? ctx.getExternalContext().getRequestContextPath() : null;
      if ("".equals(cookiePath))
      {
         cookiePath = "/";
      }
      return cookiePath;
   }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list