directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1490524 - /directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Password.java
Date Fri, 07 Jun 2013 07:11:25 GMT
Author: pamarcelot
Date: Fri Jun  7 07:11:25 2013
New Revision: 1490524

URL: http://svn.apache.org/r1490524
Log:
Fixed tests.

Modified:
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Password.java

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Password.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Password.java?rev=1490524&r1=1490523&r2=1490524&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Password.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/Password.java
Fri Jun  7 07:11:25 2013
@@ -65,8 +65,10 @@ public class Password
     /** The salt */
     private byte[] salt;
 
+    /** The 'unsupported hash' flag */
     private boolean isUnsupportedHashMethod = false;
 
+    /** The 'invalid hash' flag */
     private boolean isInvalidHashValue = false;
 
     /** The trash, used for unknown hash methods. */
@@ -260,6 +262,11 @@ public class Password
 
         boolean verified = false;
 
+        if ( isInvalidHashValue || isUnsupportedHashMethod )
+        {
+            return false;
+        }
+
         if ( hashMethod == null )
         {
             verified = testPasswordAsPlaintext.equals( LdifUtils.utf8decode( hashedPassword
) );



Mime
View raw message