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

Jean-Noel Rouvignac
16.57.2015 a41662c1136b2bb4a4198df89e0e87d2be3ef099
opendj-server-legacy/src/main/java/org/opends/server/extensions/LengthBasedPasswordValidator.java
@@ -81,7 +81,7 @@
    // maximum length is greater than or equal to the minimum length.
    int maxLength = configuration.getMaxPasswordLength();
    int minLength = configuration.getMinPasswordLength();
    if ((maxLength > 0) && (minLength > 0) && (minLength > maxLength))
    if (maxLength > 0 && minLength > 0 && minLength > maxLength)
    {
      LocalizableMessage message =
          ERR_PWLENGTHVALIDATOR_MIN_GREATER_THAN_MAX.get(minLength, maxLength);
@@ -112,14 +112,14 @@
    int numChars = newPassword.toString().length();
    int minLength = config.getMinPasswordLength();
    if ((minLength > 0) && (numChars < minLength))
    if (minLength > 0 && numChars < minLength)
    {
      invalidReason.append(ERR_PWLENGTHVALIDATOR_TOO_SHORT.get(minLength));
      return false;
    }
    int maxLength = config.getMaxPasswordLength();
    if ((maxLength > 0) && (numChars > maxLength))
    if (maxLength > 0 && numChars > maxLength)
    {
      invalidReason.append(ERR_PWLENGTHVALIDATOR_TOO_LONG.get(maxLength));
      return false;
@@ -151,7 +151,7 @@
    // maximum length is greater than or equal to the minimum length.
    int maxLength = configuration.getMaxPasswordLength();
    int minLength = configuration.getMinPasswordLength();
    if ((maxLength > 0) && (minLength > 0) && (minLength > maxLength))
    if (maxLength > 0 && minLength > 0 && minLength > maxLength)
    {
      LocalizableMessage message = ERR_PWLENGTHVALIDATOR_MIN_GREATER_THAN_MAX.get(
              minLength, maxLength);