cyrus-sasl-2.1.22: Problems with sasl_decode64

Sebastian Kemper sebastian_ml at gmx.net
Fri Sep 8 11:24:54 EDT 2006


Ken Murchison <murch at andrew.cmu.edu> wrote on Fri, Sep 08, 2006 at 09:57:07AM -0400:

> 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.

Hi Ken,

I'll post your input to the mutt mailing list.

Thank you
Sebastian


More information about the Cyrus-sasl mailing list