Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20882

DefaultURLSecurityManager is not thread-safe

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 15.4-rc-1
    • 13.3-rc-1, 12.10.7
    • URLs
    • None
    • Unknown
    • N/A
    • N/A

    Description

      The DefaultURLSecurityManager introduced in XWIKI-10309 uses a simple HashSet to store the list of trusted domains but it is a singleton and dynamically adds the domain of the current request to the hash set. This could lead to concurrent modification of the set which is not thread-safe. Also, the initialization is not synchronized, leading to similar problems.

      I assume it is unlikely that this causes any problems in practice, but it would still be good to fix this as the resulting errors would probably be quite obscure.

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: