Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C58D117A21 for ; Mon, 27 Jul 2015 14:46:04 +0000 (UTC) Received: (qmail 26165 invoked by uid 500); 27 Jul 2015 14:46:04 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 26101 invoked by uid 500); 27 Jul 2015 14:46:04 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 26089 invoked by uid 99); 27 Jul 2015 14:46:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jul 2015 14:46:04 +0000 Date: Mon, 27 Jul 2015 14:46:04 +0000 (UTC) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (DIRSERVER-2085) The PasswordPolicyConfiguration holds the password attribute as a String MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRSERVER-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny closed DIRSERVER-2085. ---------------------------------------- > The PasswordPolicyConfiguration holds the password attribute as a String > ------------------------------------------------------------------------ > > Key: DIRSERVER-2085 > URL: https://issues.apache.org/jira/browse/DIRSERVER-2085 > Project: Directory ApacheDS > Issue Type: Bug > Components: core > Affects Versions: 2.0.0-M20 > Reporter: Emmanuel Lecharny > Fix For: 2.0.0-M21 > > > When we are dealing with a password modification, we call the {{getPwdModDetails}} methods, which try to find if a Modification is impacting the password attribute. This attribute is configured in the {{PasswordPolicyConfiguration}} class (which is either read from the config, or default to {{userPassword}}). > So far, so good, except that the password attribute is stored as a String in the {{PasswordPolicyConfiguration}} instance, which leads to code like : > {code} > if ( at.getUpId().equalsIgnoreCase( policyConfig.getPwdAttribute() ) ) > {code} > This is *broken*. If the Mods contain the OID of the password attribute instead of its name, it's not going to work. If the configured password attribute has many names, it won't work either. > We *must* store the {{AttributeType}} and not the String of the password attribute, and compare it with the {{AttributeType}} we have in the Modification. -- This message was sent by Atlassian JIRA (v6.3.4#6332)