Uploaded image for project: 'Spring Security'
  1. Spring Security
  2. SEC-1903

FirewalledResponse recompiles constant regex pattern for every instance

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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
        rwinch Rob Winch added a comment -

        Assigning to Luke since he has already pushed a fix out

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: