You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Les Hazlewood (JIRA)" <ji...@apache.org> on 2009/01/21 07:04:59 UTC
[jira] Resolved: (JSEC-34) Remember-me cookie path wrong if servlet
context path is root ("/")
[ https://issues.apache.org/jira/browse/JSEC-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Les Hazlewood resolved JSEC-34.
-------------------------------
Resolution: Fixed
Assignee: Les Hazlewood
Fixed by making the path "/" if the cookieAttribute.path is null and request.getContextPath() returns null or the empty string. 2 test cases added for verification.
http://svn.apache.org/viewvc?view=rev&revision=736234
> Remember-me cookie path wrong if servlet context path is root ("/")
> -------------------------------------------------------------------
>
> Key: JSEC-34
> URL: https://issues.apache.org/jira/browse/JSEC-34
> Project: JSecurity
> Issue Type: Bug
> Components: Web
> Affects Versions: 0.9-RC1
> Reporter: Peter Ledbrook
> Assignee: Les Hazlewood
> Fix For: 1.0
>
>
> If a web application is installed in the root context of a servlet container, the remember-me cookie defaults to a value of "" (because that's what {{request.getContextPath()}} returns). Unfortunately, this appears to attach the cookie to the current request's URL rather than the required root, "/". The offending code is in {{org.jsecurity.web.attr.CookieAttribute}} where the {{onStoreValue()}} method does this:
> {code}
> String path = getPath() != null ? getPath() : request.getContextPath()
> {code}
> We should either always append '/' to the context path or set the cookie path to "/" if the request context path is an empty string.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.