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

neil_a_wilson
17.59.2007 2c7b8d6d8c0c177e8089272140dae66b87852ff7
opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
@@ -1869,6 +1869,33 @@
              }
            }
          }
          // If we should check the password history, then do so now.
          if (pwPolicyState.maintainHistory())
          {
            List<AttributeValue> newPasswords = localOp.getNewPasswords();
            if (newPasswords != null)
            {
              for (AttributeValue v : newPasswords)
              {
                if (pwPolicyState.isPasswordInHistory(v.getValue()))
                {
                  if (selfChange || (! pwPolicyState.getPolicy().
                                            skipValidationForAdministrators()))
                  {
                    localOp.setResultCode(ResultCode.UNWILLING_TO_PERFORM);
                    int msgID = MSGID_MODIFY_PW_IN_HISTORY;
                    localOp.appendErrorMessage(getMessage(msgID));
                    break modifyProcessing;
                  }
                }
              }
              pwPolicyState.updatePasswordHistory();
            }
          }
        }