[Emacs-MIME-en:1003] Re: FLIM smtp.el and NTLM authentication bug?

Sekuri J sekuri.j at gmail.com
Thu Jul 30 09:56:22 JST 2015


Much better,  thank you! And I can confirm the smtp server is a Microsoft
Exchange 2010_SP2.

On Wed, Jul 29, 2015 at 7:40 PM, Kazuhiro Ito <kzhr at d1.dion.ne.jp> wrote:

> Hi,
>
> > I got a base64-decode error using WL while trying to authenticate using
> > NTLM with smtp server which supports this mechanism. I traced this to the
> > "smtp-primitive-auth" function in FLIM's smtp.el.
> >
> > In it, there's a call to base64 decode the server's response (line 516 of
> > smtp.el) to client's "AUTH NTLM" request:
> >
> > (sasl-step-set-data step (base64-decode-string (nth 1 response)))
> >
> > If the server responds with "NTLM Supported" (which it does in my case),
> > the base64-decode-string function throws an error.
>
> Though RFC 2554 says server's response is a 334 reply with the text
> part containing a BASE64 encoded string, Microsoft says server returns
> such human readable string on NTLM authentication. (*1)
>
> (*1) https://msdn.microsoft.com/en-us/library/cc246825.aspx
>
> > To get around this, I've edited line 516 to ignore-errors:
> >
> > (sasl-step-set-data step (ignore-errors (base64-decode-string (nth 1
> > response))))
> >
> > Is there a better way to do this?
>
> I think similar fix would be needed.  Please try the attached patch.
>
> --
> Kazuhiro Ito
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chise.org/pipermail/emacs-mime-en/attachments/20150729/c53b245b/attachment.html>


More information about the Emacs-mime-en mailing list