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

The servlet-filter-mapping after-filter setting does not correctly place the configured filter after the named filter

Details

    Description

      Description
      The servlet-filter-mapping after-filter setting does not correctly place the configured filter after the named filter

      Steps

      1. Start liferay 6.2 with hotfix-15265 installed
      2. Go to control panel > Server admin > Scripts
      3. Run the attached groovy script

      Expected the script would return mapping in the order:

      Actual The script returns in the order:

      Client's Notes

      We've run into an issue with one of the config options in a hook.  We need to configure a servlet filter to it runs after an existing servlet filter.  What actually happens is the new filter mapping is placed after the FIRST filter mapping for the existing filter. In our case we're trying to follow the Auto Login Filter which has quite a number of mappings so our new filter runs too early.   We were forced to change it to a before-filter but that's logically the wrong dependency.
      <servlet-filter-mapping>
              <servlet-filter-name>Filter 2</servlet-filter-name>
              <after-filter>Auto Login Filter</after-filter>
              <url-pattern>/pattern/*</url-pattern>
       </servlet-filter-mapping>
      

      Will work on testing in branch and master. Creating this as a GS request.

      Reproducible in 62x
      0d342d67c8a8e3760d230c2dd7560cc54c500f38

      Attachments

        1. Fixed.PNG
          Fixed.PNG
          12 kB
        2. Reproduced.PNG
          Reproduced.PNG
          16 kB

        Issue Links

          Activity

            People

              harry.chai Harry Chai
              christopher.kian Christopher Kian
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                6 years, 40 weeks ago

                Packages

                  Version Package
                  6.2.X EE