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

Valery Kharseko
15 hours ago e24c2780b6d44c7e5d386e70a1fb3346149ccdc9
opendj-server-legacy/src/main/java/org/opends/server/backends/ChangelogBackend.java
@@ -753,7 +753,7 @@
    {
      // == exact CSN
      // validate provided CSN is correct
      new CSN(filter.getAssertionValue().toString());
      validateCSN(filter.getAssertionValue());
    }
    else if (filter.getFilterType() == FilterType.AND)
    {
@@ -808,6 +808,20 @@
    }
  }
  private static void validateCSN(final ByteString assertionValue)
      throws DirectoryException
  {
    try
    {
      new CSN(assertionValue.toString());
    }
    catch (IllegalArgumentException e)
    {
      throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
          LocalizableMessage.raw("Could not convert value '%s' to a CSN", assertionValue), e);
    }
  }
  private boolean matches(SearchFilter filter, FilterType filterType, String primaryName)
  {
    return filter.getFilterType() == filterType