directory-commits mailing list archives

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

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

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

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=432038&r1=432037&r2=432038&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
Wed Aug 16 14:15:53 2006
@@ -104,7 +104,7 @@
         }
         else if ( creds instanceof String )
         {
-            creds = ( ( String ) creds ).getBytes();
+            creds = StringTools.getBytesUtf8( ( String ) creds );
         }
 
         byte[] userPassword = null;
@@ -129,7 +129,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 )
             {
@@ -314,7 +314,7 @@
         }
         else if ( password instanceof String )
         {
-            data = ( ( String ) password ).getBytes();
+            data = StringTools.getBytesUtf8( ( String ) password );
         }
         else
         {



Mime
View raw message