Affects Version/s: 7.1.X, 7.2.X, 7.3.X, Master
Fix Version/s: None
Component/s: Core Infrastructure
Steps to reproduce:
- Configure a custom context (for example /myportal) according to the following documentation: https://help.liferay.com/hc/en-us/articles/360031260592--Change-root-context-to-custom-context
- Start the portal.
- Access the portal on localhost:8080/myportal and login.
- Check the cookies from the browser console. (Chrome: Application tab -> Storage -> Cookies -> http://localhost:8080)
The cookie paths (other than the JSESSIONID) are "/" instead of "/myportal".
The cookie paths follow the context, so they are "/myportal".
Also tested on:
7.1.x @8bdff77ec76a27577ff6a204b1b9174483fdd0c1 -> Same issue
master @89d0becbbd21c907759332ee026831bf7a969173 -> Same issue
On master I had to change the following property in tomcat/conf/catalina.properties (change ROOT to myportal in the path), as the location of the support-tomcat.jar changed and it's path has ROOT hardcoded in it, and it caused errors when I tried to start the portal with a custom context: