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

Valery Kharseko
29.50.2024 d4504ff2f15951c610675e691d8bcd48986e3f89
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java
@@ -13,6 +13,7 @@
 *
 * Copyright 2006-2010 Sun Microsystems, Inc.
 * Portions Copyright 2014-2016 ForgeRock AS.
 * Portions Copyright 2024 3A Systems, LLC.
 */
package org.opends.server.backends.pluggable;
@@ -119,8 +120,8 @@
  static boolean isChild(ByteSequence parent, ByteSequence child)
  {
    if (child.length() <= parent.length()
        || child.byteAt(parent.length()) != NORMALIZED_RDN_SEPARATOR
        || !child.startsWith(parent))
            || child.byteAt(parent.length()) != NORMALIZED_RDN_SEPARATOR
            || !child.startsWith(parent))
    {
      return false;
    }
@@ -132,6 +133,9 @@
      {
        if (childSeparatorDetected)
        {
          if (child.byteAt(i-1)==NORMALIZED_ESC_BYTE) {
            continue;
          }
          return false;
        }
        childSeparatorDetected = true;