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

Kazuhiro Ito kzhr at d1.dion.ne.jp
Thu Jul 30 08:40:10 JST 2015


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 --------------
A non-text attachment was scrubbed...
Name: smtp.el.diff
Type: application/octet-stream
Size: 683 bytes
Desc: not available
URL: <http://lists.chise.org/pipermail/emacs-mime-en/attachments/20150730/1bb17b0a/attachment.obj>


More information about the Emacs-mime-en mailing list