Spring Security
  1. Spring Security
  2. SEC-1903

FirewalledResponse recompiles constant regex pattern for every instance

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.1
    • Component/s: Web
    • Labels:

      Description

      org.springframework.security.web.firewal.FirewalledResponse holds a regex Pattern as an instance member. This means it is instantiated and recompiled for every FirewalledResponse instance. These are created quite rapidly in the FilterChainProxy filter invocation. The pattern should probably become a static member.

        Activity

        Hide
        Rob Winch added a comment -

        Assigning to Luke since he has already pushed a fix out

        Show
        Rob Winch added a comment - Assigning to Luke since he has already pushed a fix out

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Ophir Radnitz
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: