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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.4.2
    • Wiki
    • None
    • Windows 11 Pro, Firefox 140, using an instance of XWiki 17.4.2 on MySQL 9.3, Tomcat 11.0.8
    • Unknown

    Description

      Steps to reproduce

      1. Have a subwiki created with configuration "Open for any user to join"
      2. On Main Wiki, 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-07-08 15:28:02,290 [http-nio-1115-exec-2 - http://localhost:1115/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.xwiki.wiki.user.internal.DefaultWikiUserManager.addMemberObject(DefaultWikiUserManager.java:199)
              at org.xwiki.wiki.user.internal.DefaultWikiUserManager.addMember(DefaultWikiUserManager.java:230)
      
      [......]
      
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1773)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:59)
              at java.base/java.lang.Thread.run(Thread.java:1583) 

      When leaving a subwiki, the following stacktrace is displayed:

      2025-07-08 15:28:26,096 [http-nio-1115-exec-4 - http://localhost:1115/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.addXObjectToRemove(XWikiDocument.java:6232)
              at com.xpn.xwiki.doc.XWikiDocument.removeXObject(XWikiDocument.java:8366)
              at org.xwiki.wiki.user.internal.DefaultWikiUserManager.removeMember(DefaultWikiUserManager.java:292)
              at org.xwiki.wiki.user.internal.DefaultWikiUserManager.leave(DefaultWikiUserManager.java:495)
              at org.xwiki.wiki.user.script.WikiUserManagerScriptService.leave(WikiUserManagerScriptService.java:522)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
              at java.base/java.lang.reflect.Method.invoke(Method.java:580)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
      
      [......]
      
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:59)
              at java.base/java.lang.Thread.run(Thread.java:1583)

      Please find attached the full logs.

      Attachments

        1. Join_Subwiki_logs_Full.txt
          22 kB
          Ilie Andriuta
        2. Leave_Subwiki_logs_Full.txt
          21 kB
          Ilie Andriuta

        Issue Links

          Activity

            People

              Unassigned Unassigned
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: