CVS: beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous SASLAnonymousProfile.java,1.6,1.7

Huston Franklin <[email protected]> Thu, 22 Aug 2002 11:11:25 -0700
Newsgroups gmane.network.beep.beepcore.java.cvs
Message-ID <[email protected]>
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous
In directory usw-pr-cvs1:/tmp/cvs-serv32164

Modified Files:
	SASLAnonymousProfile.java 
Log Message:
Kion's fix for bug 469725: NPE on authentication failure

Index: SASLAnonymousProfile.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous/SASLAnonymousProfile.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** SASLAnonymousProfile.java	29 Nov 2001 04:00:00 -0000	1.6
--- SASLAnonymousProfile.java	22 Aug 2002 18:11:22 -0000	1.7
***************
*** 161,165 ****
       */
      public static Session AuthenticateSASLAnonymous(Session session, String id)
!             throws BEEPException
      {
          if (id == null) {
--- 161,165 ----
       */
      public static Session AuthenticateSASLAnonymous(Session session, String id)
!             throws BEEPException, AuthenticationFailureException
      {
          if (id == null) {
***************
*** 178,181 ****
--- 178,190 ----
              {
                  auth.wait();
+ 
+                 //FIX for bug 469725, if authentication fails no local Cred is
+                 //set and a AuthenticationFailureException is thrown
+                 if (ch.getSession().getLocalCredential() == null)
+                 {
+                     throw new AuthenticationFailureException( 
+                         "Could not authenticate with SASL/ANON");
+                 }
+ 
                  return ch.getSession();
              }



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390