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

Chris Ridd
22.49.2012 d6ae4ae4c89d1fe6c2290e7837dff85fe5d379ec
Fix OPENDJ-565 Attribute Value password validator finds password in the userPassword attribute
1 files modified
5 ■■■■ changed files
opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java 5 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
@@ -1137,11 +1137,14 @@
        // There are never any current passwords for an add operation.
        HashSet<ByteString> currentPasswords = new HashSet<ByteString>(0);
        MessageBuilder invalidReason = new MessageBuilder();
        // Work on a copy of the entry without the password to avoid
        // false positives from some validators.
        copy.removeAttribute(passwordAttribute);
        for (PasswordValidator<?> validator :
          passwordPolicy.getPasswordValidators())
        {
          if (! validator.passwordIsAcceptable(value, currentPasswords, this,
                                               entry, invalidReason))
                                               copy, invalidReason))
          {
            addPWPolicyControl(
                 PasswordPolicyErrorType.INSUFFICIENT_PASSWORD_QUALITY);