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();
}
|