This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-adff7334-3a95-43dc-a903-7f97e231df58 XWIKI-23400 Open

Abusive modification of the cached document when changing the authentication service

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-faa3abe8-9bd2-420e-82dc-224211ecf9aa Ilie Andriuta created this issue on 22/Jul/25 16:58
 
Summary: Abusive modification of the cached document when changing the authentication service
Issue Type: cid:jira-generated-image-avatar-adff7334-3a95-43dc-a903-7f97e231df58 Bug
Affects Versions: 17.3.0
Assignee: Unassigned
Attachments: OpenID_change_logs.txt
Components: Administration
Created: 22/Jul/25 16:58
Environment: Windows 11 Pro, Chrome 138, using an instance of XWiki 17.4.2 on Oracle 19c, Tomcat 11.0.8
Priority: cid:jira-generated-image-static-major-60df9d99-c0a2-4b7d-9fe3-c7c4bb30e071 Major
Reporter: Ilie Andriuta
Description:

Steps to reproduce

  1. Install an authenticator (I tested by just installing Microsoft Entra ID OpenID Connect (OIDC) 2.0.2)
  2. After installation, go to Administer Wiki > User & Rights > Authentication
  3. Under 'Authentication Service' section, select 'OpenID Connect Authenticator'
  4. Observe the XWiki logs

Expected results

No errors/ warnings are displayed.

Actual results

The following stacktrace is displayed:

2025-07-22 17:49:46,283 [qtp1486566962-573 - http://localhost:1750/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Authentication] WARN  c.x.x.d.XWikiDocument          - Abusive modification of the cached document [xwiki:XWiki.AuthService.Configuration()]
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.setDirty(BaseElement.java:133)
        at com.xpn.xwiki.objects.BaseProperty.setDirty(BaseProperty.java:413)
        at com.xpn.xwiki.objects.BaseProperty.setValueDirty(BaseProperty.java:407)
        at com.xpn.xwiki.objects.BaseStringProperty.setValue(BaseStringProperty.java:61)
        at com.xpn.xwiki.objects.BaseCollection.setStringValue(BaseCollection.java:338)
        at org.xwiki.security.authservice.internal.AuthServiceConfiguration.setAuthServiceId(AuthServiceConfiguration.java:169)
        at org.xwiki.security.authservice.internal.AuthServiceConfiguration.setAuthServiceId(AuthServiceConfiguration.java:183)
        at org.xwiki.security.authservice.script.AuthServiceScriptService.setAuthService(AuthServiceScriptService.java:160)
        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.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
        at org.apache.velocity.Template.merge(Template.java:358)
        at org.apache.velocity.Template.merge(Template.java:262)
        at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:233)
        at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:168)
        at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:60)
        at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:279)
        at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)
        at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)
        at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:441)
        at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
        at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:88)
        at org.xwiki.display.internal.DocumentContentAsyncExecutor.executeInCurrentExecutionContext(DocumentContentAsyncExecutor.java:397)
        at org.xwiki.display.internal.DocumentContentAsyncExecutor.executeInIsolatedExecutionContext(DocumentContentAsyncExecutor.java:365)
        at org.xwiki.display.internal.DocumentContentAsyncExecutor.execute(DocumentContentAsyncExecutor.java:267)
        at org.xwiki.display.internal.DocumentContentAsyncRenderer.execute(DocumentContentAsyncRenderer.java:112)
        at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)
        at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)
        at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:290)
        at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
        at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)
[...................]
at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:678)
        at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:416)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
        at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:480)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:443)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)
        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)

Please find attached the full stacktrace.