Fixed a problem in the sasl state machine
authorMikael Hallendal <micke@imendio.com>
Sat, 24 Feb 2007 02:22:55 +0100
changeset 225 bf60cd9af13f
parent 224 447f16217278
child 226 5a31f474b9fd
Fixed a problem in the sasl state machine At least Wildfire does not send an extra challange but directly sends a success. From what I could see in RFC 3920 this is perfectly legal but the state machine in LmSASL assumed there would be an extra step.
loudmouth/lm-sasl.c
--- a/loudmouth/lm-sasl.c	Sat Feb 24 01:47:22 2007 +0100
+++ b/loudmouth/lm-sasl.c	Sat Feb 24 02:22:55 2007 +0100
@@ -534,7 +534,8 @@
 		}
 		break;
 	case AUTH_TYPE_DIGEST:
-		if (sasl->state != SASL_AUTH_STATE_DIGEST_MD5_SENT_FINAL_RESPONSE) {
+		if (sasl->state != SASL_AUTH_STATE_DIGEST_MD5_SENT_AUTH_RESPONSE &&
+		    sasl->state != SASL_AUTH_STATE_DIGEST_MD5_SENT_FINAL_RESPONSE) {
 			g_debug ("%s: server sent success before finishing auth", G_STRFUNC);
 			if (sasl->handler) {
 				sasl->handler (sasl, sasl->connection, FALSE, "server error");