Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9059

Moving nodes doesn't remove source path(s) from HIDDEN_NESTED_CUGS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.22.4, 1.30.0
    • authorization-cug
    • 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.

      Attachments

        Activity

          People

            angela Angela Schreiber
            angela Angela Schreiber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: