Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3654

Error MembershipCache if a group node contains MV property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2, 2.3, 2.4.4, 2.5, 2.6.4, 2.7
    • 2.4.5, 2.6.5, 2.7.1
    • security
    • None

    Description

      the MembershipCache.collectDeclaredMembershipFromTraversal traverses the entire /home/groups tree and analyzes all properties if they contain a reference to the authorizable node. this is very suboptimal and in case there is a multivalue, this even throws an error.

      suggest:

      • do an intelligent traversal instead using the TraversingItemVisitor.
      • be cautious not to read MV properties unchecked.

      Potential error:

      com.day.crx.security.ldap.LDAPLoginModule Cause: javax.jcr.ValueFormatException: propert
      y /home/groups/a/administrators/jcr:mixinTypes is a multi-valued property, so it's values can only be retrieved as an array
      at org.apache.jackrabbit.core.PropertyImpl.internalGetValue(PropertyImpl.java:483)
      at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:510)
      at org.apache.jackrabbit.core.PropertyImpl.getString(PropertyImpl.java:520)
      at org.apache.jackrabbit.core.security.user.MembershipCache$1.entering(MembershipCache.java:363)
      at javax.jcr.util.TraversingItemVisitor.visit(TraversingItemVisitor.java:160)
      at org.apache.jackrabbit.core.PropertyImpl.accept(PropertyImpl.java:904)
      at javax.jcr.util.TraversingItemVisitor.visit(TraversingItemVisitor.java:187)
      at org.apache.jackrabbit.core.NodeImpl.accept(NodeImpl.java:1720)
      at javax.jcr.util.TraversingItemVisitor.visit(TraversingItemVisitor.java:191)
      at org.apache.jackrabbit.core.NodeImpl.accept(NodeImpl.java:1720)
      at javax.jcr.util.TraversingItemVisitor.visit(TraversingItemVisitor.java:191)
      at org.apache.jackrabbit.core.security.user.MembershipCache.collectDeclaredMembershipFromTraversal(MembershipCache.java:374)
      at org.apache.jackrabbit.core.security.user.MembershipCache.collectDeclaredMembership(MembershipCache.java:200)
      at org.apache.jackrabbit.core.security.user.AuthorizableImpl.collectMembership(AuthorizableImpl.java:358)
      at org.apache.jackrabbit.core.security.user.AuthorizableImpl.declaredMemberOf(AuthorizableImpl.java:89)
      at org.apache.jackrabbit.core.security.user.UserImpl.declaredMemberOf(UserImpl.java:38)

      Attachments

        Activity

          People

            tripod Tobias Bocanegra
            tripod Tobias Bocanegra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: