Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
when moving a tree that hold a nested CUG structure the HIDDEN_NESTED_CUGS property gets updated to contain the new destination path (i.e. during the second 'add'-phase of the move) but doesn't remove the original source path.
while permission evaluation is correct, this may lead to IllegalArgumentException raised by org.apache.jackrabbit.oak.commons.PathUtils.relativize called during NestedCugHook$Diff.childNodeDeleted, when the policy node containing the HIDDEN_NESTED_CUGS property is removed later on.
proposed fix:
- clear source-path(s) from HIDDEN_NESTED_CUGS during commits that contain move operation(s)
- prevent NestedCugHook$Diff.childNodeDeleted to fail but rather ignore paths that cannot be 'relativized' during the reconnect preparation (i.e. not moving those entries to the hidden property with the next parent CUG upon policy removal). this will also make sure inconsistencies introduced by past move operations get cleared upon policy removal.