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

Warn about abusive manipulation of cached XWikiDocument

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 17.2.0-rc-1
    • 17.1.0-rc-1
    • Old Core
    • None
    • Unit
    • Unknown

    Description

      Directly modifying the XWikiDocument from the document cache is a very bad practice because it potentially impacts all threads and it could corrupt the cache if the XWikiDocument us never saved. Instead one is supposed to clone a XWikiDocument before modifying it.

      The idea is to warn about any write on a cached XWikiDocument with a stack trace to find the source of that writing.

      See https://forum.xwiki.org/t/make-sure-to-always-return-a-clean-document-from-the-cache/15562/1 for the related proposal.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: