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

Setting the portal property web.server.protocol will expose the application server's port in page's source

    Details

      Description

      Description
      Setting web.server.protocol=https in portal-ext.properties will expose the Application Server's port in the source of the default landing page. By default this property is commented out and the port is not exposed.

      This happens becauseĀ getSiteAdminURL returns a URL based on the Virtualhost.

      Steps to Reproduce:
      In a clean Liferay DXP bundle:

      1. Set up Liferay to use Apache
        Set the portal-ext.properties to:
        web.server.http.port=80
        web.server.https.port=443
        web.server.protocol=https
        portal.proxy.path=/liferay
        redirect.url.ips.allowed=127.0.0.1,SERVER_IP,[the apache's IP]
      2. Set up apache
        I used a VM and set the following properties:
        ProxyPass /liferay ajp://<tomcat's ip>:8009
        ProxyPassReverse /liferay ajp://<tomcat's ip>:8009
      3. Start Liferay and navigate to the homepage through Apache
      4. When the default landing page loads, right click anywhere on the page and select 'View Page Source'.
      5. Search the page for "siteadminurl".

      Expected:
      Source reads: getSiteAdminURL:function()return"https://[APACHE_IP]/liferay/group/guest/~/control_panel...

      Actual:
      The application server's port is exposed, source reads:
      getSiteAdminURL:function()return"https://localhost/liferay/group/guest/~/control_panel...

      Additional Testing:
      70x: 4882cfee5f8f6f8764e87ca17c92e33023c794ce
      Issue reproduced in branch.

      Master: 83aaf8c1a71502ed04398c5d761abd30e204fed0
      Issue reproduced in master.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 7 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP28
                7.0.X EE
                7.0.4 CE GA5
                7.1.X
                Master