directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1568515 - /directory/apacheds/trunk/interceptors/hash/src/main/java/org/apache/directory/server/core/hash/PasswordHashingInterceptor.java
Date Fri, 14 Feb 2014 20:54:58 GMT
Author: kayyagari
Date: Fri Feb 14 20:54:57 2014
New Revision: 1568515

URL: http://svn.apache.org/r1568515
Log:
check for password attribute in all modifications

Modified:
    directory/apacheds/trunk/interceptors/hash/src/main/java/org/apache/directory/server/core/hash/PasswordHashingInterceptor.java

Modified: directory/apacheds/trunk/interceptors/hash/src/main/java/org/apache/directory/server/core/hash/PasswordHashingInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/hash/src/main/java/org/apache/directory/server/core/hash/PasswordHashingInterceptor.java?rev=1568515&r1=1568514&r2=1568515&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/hash/src/main/java/org/apache/directory/server/core/hash/PasswordHashingInterceptor.java
(original)
+++ directory/apacheds/trunk/interceptors/hash/src/main/java/org/apache/directory/server/core/hash/PasswordHashingInterceptor.java
Fri Feb 14 20:54:57 2014
@@ -30,6 +30,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.entry.Modification;
+import org.apache.directory.api.ldap.model.entry.ModificationOperation;
 import org.apache.directory.api.ldap.model.entry.Value;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.password.PasswordUtil;
@@ -113,14 +114,17 @@ public abstract class PasswordHashingInt
             // check for modification on 'userPassword' AT
             if ( SchemaConstants.USER_PASSWORD_AT_OID.equals( oid ) )
             {
+                if ( mod.getOperation() == ModificationOperation.REMOVE_ATTRIBUTE )
+                {
+                   continue; 
+                }
+                
                 Attribute newPwd = includeHashedPassword( mod.getAttribute() );
 
                 if ( newPwd != null )
                 {
                     mod.setAttribute( newPwd );
                 }
-
-                break;
             }
         }
 



Mime
View raw message