tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1548185 - /tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java
Date Thu, 05 Dec 2013 16:11:55 GMT
Author: markt
Date: Thu Dec  5 16:11:55 2013
New Revision: 1548185

URL: http://svn.apache.org/r1548185
Log:
Additional fix for BZ 55839 required by MemoryRealm

Modified:
    tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java?rev=1548185&r1=1548184&r2=1548185&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java Thu Dec  5 16:11:55 2013
@@ -115,17 +115,7 @@ public class MemoryRealm  extends RealmB
 
         GenericPrincipal principal = principals.get(username);
 
-        boolean validated = false;
-        if (principal != null && credentials != null) {
-            if (hasMessageDigest()) {
-                // Hex hashes should be compared case-insensitive
-                validated = (digest(credentials)
-                             .equalsIgnoreCase(principal.getPassword()));
-            } else {
-                validated =
-                    (digest(credentials).equals(principal.getPassword()));
-            }
-        }
+        boolean validated = compareCredentials(credentials, principal.getPassword());
 
         if (validated) {
             if (log.isDebugEnabled())



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message