This issue has been created
There is 1 update, 1 comment.
This issue has been deleted
 
 
XWiki Platform / cid:jira-generated-image-avatar-ca58d587-5da9-4ff6-baf0-d39944e1a800 XWIKI-23388

Upgrading the extension can bring the instance down

 

Issue created

 
cid:jira-generated-image-avatar-145e56d8-7a34-464b-8295-77d20f576891 Raluca Stavro created this issue on 18/Jul/25 16:41
 
Summary: Upgrading the extension can bring the instance down
Issue Type: cid:jira-generated-image-avatar-ca58d587-5da9-4ff6-baf0-d39944e1a800 Bug
Affects Versions: 1.23
Assignee: Unassigned
Created: 18/Jul/25 16:41
Priority: cid:jira-generated-image-static-critical-00e90f34-83cb-40a1-8884-c423a064e80f Critical
Reporter: Raluca Stavro
Description:

The cause is around https://github.com/xwiki-contrib/book-versions/blob/c81acdd94aa054388e27d1e6d908e12f05406376/application-book-versions-api/src/main/java/org/xwiki/contrib/bookversions/internal/PublishBookRightInitializer.java#L89 and it is related to the fact that every Right has a value, and that value needs to be below 64 because of the way we store right sets. And when you unregister a right that is not the last registered right, you break that whole system. So, basically, unregistering of rights is only supported when you unregister the last registered right. Plus, the values that are associated with rights need to be continuous.

 
 

1 update

 
cid:jira-generated-image-avatar-145e56d8-7a34-464b-8295-77d20f576891 Changes by Raluca Stavro on 18/Jul/25 16:41
 
Assignee: Raluca Stavro
 
 

Issue deleted

 
cid:jira-generated-image-avatar-145e56d8-7a34-464b-8295-77d20f576891 Raluca Stavro has deleted this issue on 18/Jul/25 16:46
 
 

1 comment

 
cid:jira-generated-image-avatar-145e56d8-7a34-464b-8295-77d20f576891 Raluca Stavro on 18/Jul/25 16:45
 

One workaround is to :

1. Not unregister the right.
2. Only register the right when it hasn't been registered yet. The actual right is not tied to the PublishBookRight instance in any way so there shouldn't be any problem that the PublishBookRight instance isn't the same anymore.

The only side effect is that uninstalling the extension won't remove the right from the UI anymore, but it will be gone after the next restart.

The only problem could be if someone wants to change any properties of the right, but even in that case it might be totally acceptable that the updated properties are only applied on the next restart.