Spring Security
  1. Spring Security
  2. SEC-1235

The order of the filter chain breaks if you mix variables and hard coded patterns

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.5
    • Fix Version/s: 3.0.0 RC1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      any

      Description

      When you put together a list of items the framework orders them based on the order in the XML (top to bottom). If you add variables within the mix though, it reorders the list to put the variable items 'last'. For instance

      <security:filter-chain-map path-type="ant">
      <security:filter-chain pattern="$

      {authentication.success.filter}

      *" filters="httpSessionContextIntegrationFilter, exceptionTranslationFilter,authenticationProcessingFilter, inaraUserPrepFilter, filterSecurityInterceptor"/>
      inaraUserPrepFilter, filterSecurityInterceptor"/>-->
      <security:filter-chain pattern="$

      {app.logout}

      " filters="logoutFilter"/>
      <security:filter-chain pattern="/**" filters="httpSessionContextIntegrationFilter"/
      </security:filter-chain-map>

      Gives an error that the /** must be last. If you make them all variables then it works fine. This is fairly trivial, and probably could just be fixed with documentation, but it did take some time to sort out what was happening.

        Activity

        Hide
        Luke Taylor added a comment -

        I can't reproduce this behaviour with the current trunk. There isn't any code I'm aware of where the use of placeholders would cause any re-ordering of the map. If it did then that would be a bug. Can you provide a test case which reproduces the issue?

        Show
        Luke Taylor added a comment - I can't reproduce this behaviour with the current trunk. There isn't any code I'm aware of where the use of placeholders would cause any re-ordering of the map. If it did then that would be a bug. Can you provide a test case which reproduces the issue?

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Tony Lowe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: