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

Abusive modification of the cached document when joining and leaving a subwiki

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.4.0
    • Wiki
    • None
    • Windows 11 Pro, Edge 137, using an instance of XWiki 17.4.0 on MariaDB 11.7, Tomcat 11.0.7
    • Unknown

    Description

      Steps to reproduce

      1. Have a subwiki created
      2. Login with an user who is not a member of this subwiki
      3. Go to WikiManager
      4. Click "Join" from 'Actions' column
      5. Click "Yes"
      6. Observe the XWiki logs
      7. Go again to WikiManager
      8. Click "Leave" from 'Actions' column
      9. Click "Yes"
      10. Observe the XWiki logs

      Expected results

      No warnings are displayed in the logs.

      Actual results

      When joining a subwiki, the following stacktrace is displayed:

      2025-06-16 20:07:38,122 [qtp211968962-39 - http://localhost:1740/xwiki/bin/view/WikiManager/JoinWiki] WARN  c.x.x.d.XWikiDocument          - Abusive modification of the cached document [subwikiglobal:XWiki.XWikiAllGroup()]
      java.lang.IllegalStateException: Abusive modification of the cached document
              at com.xpn.xwiki.doc.XWikiDocument.setMetaDataDirty(XWikiDocument.java:2457)
              at com.xpn.xwiki.objects.BaseElement.setOwnerDocument(BaseElement.java:522)
              at com.xpn.xwiki.objects.BaseCollection.setOwnerDocument(BaseCollection.java:994)
              at com.xpn.xwiki.objects.BaseObject.setOwnerDocument(BaseObject.java:424)
              at com.xpn.xwiki.doc.XWikiDocument.createXObject(XWikiDocument.java:2995)
              at 
      
      [......]
      
      org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:981)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1211)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1166)
              at java.base/java.lang.Thread.run(Thread.java:1583)

      When leaving a subwiki, the following stacktrace is displayed:

      2025-06-16 20:08:56,259 [qtp211968962-135 - http://localhost:1740/xwiki/bin/view/WikiManager/LeaveWiki] WARN  c.x.x.d.XWikiDocument          - Abusive modification of the cached document [subwikiglobal:XWiki.XWikiAllGroup()]
      java.lang.IllegalStateException: Abusive modification of the cached document
              at com.xpn.xwiki.doc.XWikiDocument.setMetaDataDirty(XWikiDocument.java:2457)
              at com.xpn.xwiki.doc.XWikiDocument.setXObjectsToRemove(XWikiDocument.java:6292)
              at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:714)
              at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:277)
              at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:239)
              at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2113)
              at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2008)
              at org.xwiki.wiki.user.internal.DefaultWikiUserManager.saveGroupDocument(DefaultWikiUserManager.java:150)
              at org.xwiki.wiki.user.internal.DefaultWikiUserManager.removeMember(DefaultWikiUserManager.java:287)
              
      [......]
      
               at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:981)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1211)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1166)
              at java.base/java.lang.Thread.run(Thread.java:1583)

      Please find attached the full stacktraces.

       

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            iandriuta Ilie Andriuta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: