mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

floblanc
23.55.2009 cc8f4b9e06c3caa2aa6ec2359ec3feea6a10da1d
Fix issue 3817 Creating a 2nd workflow with cn=config baseDn can break the configuration
1 files modified
18 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java 18 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
@@ -1246,8 +1246,11 @@
    {
      // Search the highest workflow in the topology that can handle
      // the baseDN.
      //First search the private workflows
      // The order is important to ensure that the admin network group
      // is not broken and can always find cn=config
      for (WorkflowTopologyNode curWorkflow : namingContexts
          .getNamingContexts())
          .getPrivateNamingContexts())
      {
        workflowCandidate = curWorkflow.getWorkflowCandidate(baseDN);
        if (workflowCandidate != null)
@@ -1255,6 +1258,19 @@
          break;
        }
      }
      // If not found, search the public
      if (workflowCandidate == null) {
        for (WorkflowTopologyNode curWorkflow : namingContexts
            .getPublicNamingContexts())
        {
          workflowCandidate = curWorkflow.getWorkflowCandidate(baseDN);
          if (workflowCandidate != null)
          {
            break;
          }
        }
      }
    }
    return workflowCandidate;