Subject: pkg/30981: Mutt's `recall-message' not working with DIGEST-MD5 (patch supplied)
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <j+nbsd@2005.salmi.ch>
List: pkgsrc-bugs
Date: 08/13/2005 09:57:01
>Number:         30981
>Category:       pkg
>Synopsis:       Mutt's `recall-message' not working with DIGEST-MD5 (patch supplied)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 13 09:57:00 +0000 2005
>Originator:     Jukka Salmi
>Release:        NetBSD 3.99.7
>Environment:
System: NetBSD moray.salmi.ch 3.99.7 NetBSD 3.99.7 (GENERIC) #1: Wed Aug 10 20:44:25 CEST 2005 build@moray.salmi.ch:/build/nbsd/i386/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Using mail/mutt-devel and security/cy2-digestmd5 from HEAD pkgsrc,
recalling a postponed message using Mutt's `recall-message' function
fails when authenticating with DIGEST-MD5 to an IMAP server. This
problem is explained in more detail as Mutt PR 2034:

http://bugs.mutt.org/cgi-bin/gnatsweb.pl?database=mutt&cmd=view+audit-trail&pr=2034

>How-To-Repeat:
Authenticate with DIGEST-MD5 to an IMAP server and postpone a message.
Type `R' (or whatever key `recall-message' is bound to) to recall the
message. See Mutt fail.

>Fix:
This problem is fixed on Mutt's CVS HEAD. The patch is attached and
available from
http://salmi.ch/~jukka/patches/pkgsrc/localpatches/mail/mutt-devel/patch-sasl-digest-md5

Index: imap/auth_sasl.c
===================================================================
RCS file: /cvsroots/mutt/imap/auth_sasl.c,v
retrieving revision 3.7
retrieving revision 3.8
diff -u -p -r3.7 -r3.8
--- imap/auth_sasl.c	3 Feb 2005 17:01:44 -0000	3.7
+++ imap/auth_sasl.c	12 Aug 2005 22:33:00 -0000	3.8
@@ -150,7 +150,10 @@ imap_auth_res_t imap_auth_sasl (IMAP_DAT
       }
     }
 
-    if (!client_start)
+    /* client-start is only available with the SASL-IR extension, but
+     * SASL 2.1 seems to want to use it regardless, at least for DIGEST
+     * fast reauth. Override if the server sent an initial continuation */
+    if (!client_start || buf[0])
     {
       do
       {