You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/07 23:27:26 UTC

svn commit: r1335267 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java

Author: doogie
Date: Mon May  7 21:27:25 2012
New Revision: 1335267

URL: http://svn.apache.org/viewvc?rev=1335267&view=rev
Log:
FIX: Bare passwords(circa 595296) comparisons were broken; they actually
used the oldFunnyHex encoding, not the fixed correct hex encoding.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java?rev=1335267&r1=1335266&r2=1335267&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java Mon May  7 21:27:25 2012
@@ -96,8 +96,7 @@ public class HashCrypt {
         String hashed = crypted;
         MessageDigest messagedigest = getMessageDigest(hashType);
         messagedigest.update(bytes);
-        char[] digestChars = Hex.encodeHex(messagedigest.digest());
-        return hashed.equals(new String(digestChars));
+        return hashed.equals(oldFunnyHex(messagedigest.digest()));
     }
 
     /*