CVSROOT:        /cvs
Module name:    src
Changes by:     o...@cvs.openbsd.org    2009/04/02 23:20:17

Modified files:
        usr.sbin/smtpd : smtpd.c 

Log message:
The smtp auth PLAIN specification is weird. It's valid (apparently for
imap, mostly) to provide "username1\0real_username\0password" as your
base64 encoded string for authentication. We currently don't handle
that, instead expecting the first byte to be a NUL.  So fix that up by
scanning for the first string, and ignoring it if it's there. The string
is also stupid in that the last bit (password) may not be NUL
terminated, so pay attention to that in our decoding and make sure that
it's always terminated correctly.

It's been discussed, and this decoding really should happen in the
unauthenticated process, not in the privileged one, but that is another
diff.

Problem found by todd@, who kindly helped me debug this and confirmed
that it now works with kmail, mutt and thunderbird.

"if it makes more stuff work, please commit" jac...@.

-0- - not a smtpd hacker and I resent your implication.

Reply via email to