User: starksm 
  Date: 01/05/30 05:23:25

  Modified:    src/main/org/jboss/security/auth/spi
                        UsernamePasswordLoginModule.java
  Log:
  Update failure msgs and prevent NPE when null password is given
  
  Revision  Changes    Path
  1.3       +4 -4      
jbosssx/src/main/org/jboss/security/auth/spi/UsernamePasswordLoginModule.java
  
  Index: UsernamePasswordLoginModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/UsernamePasswordLoginModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UsernamePasswordLoginModule.java  2001/04/13 20:04:54     1.2
  +++ UsernamePasswordLoginModule.java  2001/05/30 12:23:25     1.3
  @@ -37,7 +37,7 @@
   @see #getUsersRoles()
   
   @author [EMAIL PROTECTED]
  -@version $Revision: 1.2 $
  +@version $Revision: 1.3 $
   */
   public abstract class UsernamePasswordLoginModule extends AbstractServerLoginModule
   {
  @@ -82,10 +82,10 @@
           String expectedPassword = getUsersPassword();
           if( validatePassword(password, expectedPassword) == false )
           {
  -            System.out.println("[JAASSecurity] Bad password.");
  +            System.out.println("Bad password for username="+username);
               throw new FailedLoginException("Password Incorrect/Password Required");
           }
  -        System.out.print("[JAASSecurity] User '" + username + "' authenticated.\n");
  +        System.out.print("User '" + username + "' authenticated.\n");
   
           if( getUseFirstPass() == true )
           {    // Add the username and password to the shared state map
  @@ -138,8 +138,8 @@
                   credential = new char[tmpPassword.length];
                   System.arraycopy(tmpPassword, 0, credential, 0, tmpPassword.length);
                   pc.clearPassword();
  +                password = new String(credential);
               }
  -            password = new String(credential);
           }
           catch(java.io.IOException ioe)
           {
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to