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

Remote host and address in service context are wrong if proxy is used

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 6.1.X EE, 6.2.0 CE RC5
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 7691e78fba898d7f81281f4f9f723ec09fc3c180.
      Tomcat 7.0 + MySQL 5. Portal master GIT ID: a8101580aecdb045626c3ac3821bf3b7638f898b.
    • Fix Priority:
      4

      Description

      If Liferay is behind a proxy then HttpServletRequest#getRemoteAddr and HttpServletRequest#getRemoteHost used in ServiceContextFactory return address of the proxy instead of address of the actual client making the request. This messes eg. the reset password email which shows where the request originated.

      Liferay could instead look for the original source from http headers as desribed here: http://stackoverflow.com/a/15323776

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Days since last comment:
                5 years, 49 weeks, 1 day ago

                Packages

                Version Package