Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-134550

Cookies do not follow custom context paths

    Details

      Description

      Steps to reproduce:

      1. 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
      2. Start the portal.
      3. Access the portal on localhost:8080/myportal and login.
      4. Check the cookies from the browser console. (Chrome: Application tab -> Storage -> Cookies -> http://localhost:8080)

      Actual results:
      The cookie paths (other than the JSESSIONID) are "/" instead of "/myportal".

      Expected results:
      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:

      common.loader="${catalina.home}/webapps/myportal/WEB-INF/lib/support-tomcat.jar"...

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            peter.petrekanics Peter Petrekanics
            Participants of an Issue:
            Recent user:
            Sophia Zhang
            Engineering Assignee:
            Istvan Sajtos
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              24 weeks, 1 day ago

                Packages

                Version Package