]> granicus.if.org Git - python/commit
#25446: Fix regression in smtplib's AUTH LOGIN support.
authorR David Murray <rdmurray@bitdance.com>
Sun, 8 Nov 2015 06:03:52 +0000 (01:03 -0500)
committerR David Murray <rdmurray@bitdance.com>
Sun, 8 Nov 2015 06:03:52 +0000 (01:03 -0500)
commitb0deeb47d862793e047eeea243f1d037f4152474
tree2a3c4f9109cea3fcb94fd1cf50aada010d6f35a0
parent65b77d625e3ad17f3963d32dc13e209ee7406ba2
#25446: Fix regression in smtplib's AUTH LOGIN support.

The auth method tests simply weren't adequate because of the fact that
smtpd doesn't support authentication.  I borrowed some of Milan's
code for that from issue #21935 and added it to the smtplib tests.
Also discovered that the direct test for the 'auth' method wasn't actually
testing anything and fixed it.

The fix makes the new authobject mechanism work the way it is
documented...the problem was that wasn't checking for a 334 return code
if an initial-response was provided, which works fine for auth plain
and cram-md5, but not for auth login.
Lib/smtplib.py
Lib/test/test_smtplib.py
Misc/NEWS