Cookies for ROOT context need a path of /
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@959754
13f79535-47bb-0310-9956-
ffa450edef68
if (contextPath == null || contextPath.length() == 0) {
contextPath = context.getEncodedPath();
}
+ // Handle special case of ROOT context where cookies require a path of
+ // '/' but the servlet spec uses an empty string
+ if (contextPath.length() == 0) {
+ contextPath = "/";
+ }
cookie.setPath(contextPath);
return cookie;
Use a LockOutRealm in the default configuration to prevent attempts to
guess user passwords by brute-force. (markt)
</add>
+ <fix>
+ <bug>49525</bug>: Ensure cookies for the ROOT context have a path of /
+ rather than an empty string. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">