Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-137

Avoid infinite loop in reference resolver: A ref to B, then B ref back to A

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.0
    • 2.0
    • None
    • None

    Description

      The system must have safeguards against this problem "Cause infinite loop if we had A ref to B, then B ref to A.". The original node should never be "resolved" again.
      Or, it would need to be that ANY parent in a resolution "tree" should never be resolved again.

      To reproduce:

      1. Change a story to reference another story in such a way as to cause a circular reference, for example configure "flavors of asia" to point to itself.

      2.Configure delivery endpoint as follows:

        stories:
          depth: 0
          includeSystemProperties: true
          bypassWorkspaceAcls: true
          rootPath: /stories-demo
          nodeTypes:
            0: mgnl:composition
          limit: 1
          references:
            tours:
              propertyName: stories
              referenceResolver:
                implementationClass: info.magnolia.rest.reference.jcr.UuidReferenceResolver
                targetWorkspace: stories
      

      3. Request endpoint.

      Result: Stack overflow.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                sang.ngo Sang Ngo Huu
                sang.ngo Sang Ngo Huu
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - 2d
                      2d
                      Remaining:
                      Time Spent - 1d 2.5h Remaining Estimate - 5.5h
                      5.5h
                      Logged:
                      Time Spent - 1d 2.5h Remaining Estimate - 5.5h
                      1d 2.5h