geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r980216 - in /geronimo/server/trunk: framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/ plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/impl/
Date Wed, 28 Jul 2010 21:01:38 GMT
Author: gawor
Date: Wed Jul 28 21:01:38 2010
New Revision: 980216

URL: http://svn.apache.org/viewvc?rev=980216&view=rev
Log:
deal with null password

Modified:
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PasswordCallbackHandler.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/impl/GeronimoLoginService.java

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PasswordCallbackHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PasswordCallbackHandler.java?rev=980216&r1=980215&r2=980216&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PasswordCallbackHandler.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PasswordCallbackHandler.java
Wed Jul 28 21:01:38 2010
@@ -51,6 +51,8 @@ public class PasswordCallbackHandler imp
     }
 
     public void clear() {
-        Arrays.fill(password, '\0');
+        if (password != null) {
+            Arrays.fill(password, '\0');
+        }
     }
 }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/impl/GeronimoLoginService.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/impl/GeronimoLoginService.java?rev=980216&r1=980215&r2=980216&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/impl/GeronimoLoginService.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/impl/GeronimoLoginService.java
Wed Jul 28 21:01:38 2010
@@ -50,7 +50,7 @@ public class GeronimoLoginService implem
     }
 
     public UserIdentity login(String userName, String password) {
-        return login(new PasswordCallbackHandler(userName, password.toCharArray()));
+        return login(new PasswordCallbackHandler(userName, (password == null) ? null : password.toCharArray()));
     }
 
     public UserIdentity login(X509Certificate[] certs) {



Mime
View raw message