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

    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:
          istvan.sajtos Istvan Sajtos
          Reporter:
          peter.petrekanics Peter Petrekanics (Inactive)
          Participants of an Issue:
          Recent user:
          Felipe Lins
          Engineering Assignee:
          Istvan Sajtos
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Dates

            Created:
            Updated:
            Days since last comment:
            1 year, 6 weeks, 6 days ago

              Packages

              Version Package