This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author merkel
Recipients barry, merkel, r.david.murray
Date 2015-10-20.15:41:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1445355692.4.0.944252984253.issue25446@psf.upfronthosting.co.za>
In-reply-to
Content
class SMTP:
    def auth_login(self, challenge=None):

The self.docmd should use cmd "AUTH" with parameter "LOGIN" + encoded login like

        (code, resp) = self.docmd("AUTH", "LOGIN " +
            encode_base64(self.user.encode('ascii'), eol=''))

with

    def auth(self, mechanism, authobject, *, initial_response_ok=True):

that should not send a "AUTH" in self.docmd in case the mechanism is 'LOGIN' and

        if initial_response is not None:

meaning

            if mechanism == 'LOGIN':
                (code, resp) = self.docmd(response)
            else:
                (code, resp) = self.docmd("AUTH", mechanism + " " + response)

---

Could someone kindly review, evtly come up with better suggestion?

In short:
$ diff /c/Python35/Lib/smtplib-old.py /c/Python35/Lib/smtplib.py
630c630,633
<             (code, resp) = self.docmd("AUTH", mechanism + " " + response)
---
>             if mechanism == 'LOGIN':
>                 (code, resp) = self.docmd(response)
>             else:
>                 (code, resp) = self.docmd("AUTH", mechanism + " " + response)
660c663
<         (code, resp) = self.docmd(
---
>         (code, resp) = self.docmd("AUTH", "LOGIN " +
History
Date User Action Args
2015-10-20 15:41:32merkelsetrecipients: + merkel, barry, r.david.murray
2015-10-20 15:41:32merkelsetmessageid: <1445355692.4.0.944252984253.issue25446@psf.upfronthosting.co.za>
2015-10-20 15:41:32merkellinkissue25446 messages
2015-10-20 15:41:31merkelcreate