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

Capitalization in Virtual Hostname results in misses in VirtualHost table


    When saving an entry to the VirtualHost table by giving a LayoutSet virtual hostname, capitalization is saved in the DB, which is incorrect.  Hostnames should be lowercase.  This results in missed fetches, since the portal always fetches lowercase, but the entries are saved with capitalization.

    Steps to reproduce:

    1. Modify hosts file to include at least two new hosts, "liferay-lower" and "LIFERAY-UPPER"
    2. Create two new sites with a public widget page on each.
    3. For each site, go to Configuration > Site Settings > Site Configuration > Site URL
    4. For one site, change the "Virtual Host" value to "liferay-lower".  The other site, use "LIFERAY-UPPER".
    5. In a new tab, visit http://liferay-lower:8080 or http://LIFERAY-LOWER:8080 (capitalization should not matter in URLs)
    6. Verify you are taken directly to the site's default public page as specified in step 4.
    7. In a new tab, visit http://liferay-upper:8080 or http://LIFERAY-UPPER:8080.

    Expected Results: Portal redirects to site created in step 4

    Actual Results: Portal redirects to default site and page, like when using localhost


    Bonus bug: The same virtual hostname can be used in multiple layoutsets or virtual instances as long as the capitalization is different.  This goes against our unique hostname constraint, at least in the functional aspect.


    Reproduced in master: 62f3e2f73e7ac48f81c19bc25e9396abc1004044




          kevin.valencia Kevin Valencia
          christopher.kian Christopher Kian
          Brian Wulbern Brian Wulbern
          Christopher Kian Christopher Kian
          0 Vote for this issue
          0 Start watching this issue


            25 weeks, 2 days ago


              Version Package
     CE GA44
     CE GA45