<<< Date Index >>>     <<< Thread Index >>>

mutt/2478: mutt needs a fix to work with recent cyrus-sasl



>Number:         2478
>Notify-List:    
>Category:       mutt
>Synopsis:       mutt needs a fix to work with recent cyrus-sasl
>Confidential:   no
>Severity:       normal
>Priority:       medium
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 08 17:50:09 +0200 2006
>Originator:     Sebastian
>Release:        
>Organization:
>Environment:
>Description:
Hi all,

I use cyrus-sasl with mutt for SASL auth. It was working fine until I upgraded 
to cyrus-sasl-2.1.22 (from 2.1.21). Now I get "SASL authentication failed!" all 
the time.

I wrote to the cyrus-sasl list (because their changes made mutt break) and Ken 
Murchison told me mutt needs a fix. 

And I quote:

"The changes to sasl_decode64() were mainly to decode partial blocks of
Base64 data, but as a side-effect, it now ONLY accepts Base64 data and
NOT any protocol bits such as the leading "+ " or the trailing "\r\n".

So, an application needs to remove these protocol bits before passsing
the data to sasl_decode64().  A quick and dirty fix for Mutt would be
the following:

if (!mutt_strncmp (inbuf, "+ ", 2)
  && sasl_decode64 (inbuf+2, strlen (inbuf)-4, buf, LONG_STRING-1,&len)
!= SASL_OK)


However, it would be safer to check for the "\r\n" before trimming it."

You can read the whole thread over http: 
http://asg.web.cmu.edu/archive/message.php?mailbox=archive.cyrus-sasl&msg=8009

Thanks
Sebastian
>How-To-Repeat:
>Fix:
Suggested by Kenneth Murchison
>Add-To-Audit-Trail:

>Unformatted: