directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r432037 - /directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
Date Wed, 16 Aug 2006 21:10:10 GMT
Author: elecharny
Date: Wed Aug 16 14:10:10 2006
New Revision: 432037

URL: http://svn.apache.org/viewvc?rev=432037&view=rev
Log:
Fix the potential bug DIRSERVER-582

Modified:
    directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java

Modified: directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=432037&r1=432036&r2=432037&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
(original)
+++ directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
Wed Aug 16 14:10:10 2006
@@ -102,7 +102,7 @@
         }
         else if ( creds instanceof String )
         {
-            creds = ( ( String ) creds ).getBytes();
+            creds = StringTools.getBytesUtf8( ( String ) creds );
         }
 
         byte[] userPassword = null;
@@ -127,7 +127,7 @@
                 String algorithm = this.getAlgorithmForHashedPassword( userPassword );
                 String digestedCredits = this.createDigestedPassword( algorithm, creds );
 
-                credentialsMatch = ArrayUtils.isEquals( digestedCredits.getBytes(), userPassword
);
+                credentialsMatch = ArrayUtils.isEquals( StringTools.getBytesUtf8( digestedCredits
), userPassword );
             }
             catch ( NoSuchAlgorithmException nsae )
             {
@@ -312,7 +312,7 @@
         }
         else if ( password instanceof String )
         {
-            data = ( ( String ) password ).getBytes();
+            data = StringTools.getBytesUtf8( ( String ) password );
         }
         else
         {



Mime
View raw message