]> granicus.if.org Git - mutt/commitdiff
In pop_auth.c:pop_auth_sasl(), if the main loop received anything
authorJon Miles <jon@zetnet.net>
Wed, 10 Sep 2003 13:20:49 +0000 (13:20 +0000)
committerJon Miles <jon@zetnet.net>
Wed, 10 Sep 2003 13:20:49 +0000 (13:20 +0000)
back from the server that didnt begin with '+ ', it was bailing out
and skipping the checks to see if there was a +OK response.

pop_auth.c

index 20cc7f094dc56fe88a953e3d0f397f4838e66b24..9353eef5c0964d5ead7f54be9220aece919e46e5 100644 (file)
@@ -106,13 +106,12 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA *pop_data, const char *method)
     if (rc != SASL_CONTINUE)
       break;
 
-    if (mutt_strncmp (inbuf, "+ ", 2))
-      goto bail;
-
 #ifdef USE_SASL2
-    if (sasl_decode64 (inbuf, strlen (inbuf), buf, LONG_STRING-1, &len) != SASL_OK)
+    if (!mutt_strncmp (inbuf, "+ ", 2)
+        && sasl_decode64 (inbuf, strlen (inbuf), buf, LONG_STRING-1, &len) != SASL_OK)
 #else
-    if (sasl_decode64 (inbuf, strlen (inbuf), buf, &len) != SASL_OK)
+    if (!mutt_strncmp (inbuf, "+ ", 2)
+        && sasl_decode64 (inbuf, strlen (inbuf), buf, &len) != SASL_OK)
 #endif
     {
       dprint (1, (debugfile, "pop_auth_sasl: error base64-decoding server response.\n"));