This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-0b8b86c5-bedb-4d9a-9bd9-6c3ceec61175 XWIKI-22891 In Progress

Warn about abusive manipulation of cached XWikiDocument

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-25c35999-4ca2-4ad4-9bd4-472a15daaeb6 Thomas Mortagne created this issue on 19/Feb/25 12:05
 
Summary: Warn about abusive manipulation of cached XWikiDocument
Issue Type: cid:jira-generated-image-avatar-0b8b86c5-bedb-4d9a-9bd9-6c3ceec61175 Improvement
Affects Versions: 17.1.0-rc-1
Assignee: Unassigned
Components: Old Core
Created: 19/Feb/25 12:05
Priority: cid:jira-generated-image-static-major-55a1194b-2695-4b22-acc8-36970bae7e13 Major
Reporter: Thomas Mortagne
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.

 
 

2 updates

 
cid:jira-generated-image-avatar-25c35999-4ca2-4ad4-9bd4-472a15daaeb6 Changes by Thomas Mortagne on 19/Feb/25 12:10
 
Assignee: Thomas Mortagne
Status: Open In Progress