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

MessageTool can read from the wrong context in scheduler jobs or threads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.5.2
    • 3.1, 3.5.1, 4.1.4, 4.2, 4.3, 4.4.1, 4.5
    • Localization
    • None
    • Unknown
    • N/A
    • N/A

    Description

      XWikiMessageTool has a context stored in it's data structure and uses that context when reading data from the wiki.

      In scheduler jobs or background threads (watchlist, extension manager, lucene, or user scheduler jobs) the context is cloned from the initial context that is passed to the initializations of the threads. If this context is from a child wiki (in multi wiki) then the message tool might read the preferences with a context from the wrong wiki while the ExecutionContext might be from another wiki. This can lead to reading the preferences from the wrong wiki or even worse lead to preferences read without objects because of a comparaison of references done in the loadXWikiDoc code. The preferences object will then be wrong in memeory and might be subsequently saved back to the wiki without the preferences object.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              ludovic Ludovic Dubost
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: