Comment 9 for bug 338261

Revision history for this message
James Henstridge (jamesh) wrote :

I helped Josh walk through this in the debugger and think I've discovered the problem. It looks like a bzrlib bug that didn't trigger a failure in prior versions. We should be able to fix this so it'll work for all Python versions.

The SMTPConnection._authenticate() code in bzrlib is passing unicode strings for the username and password down to smtplib. A change in the implementation of the hmac module in 2.6 stopped this from working (at least if the server wanted to do an HMAC based form of authentication).

The RFCs don't seem to mention character encodings for the username or password, so it isn't clear what smtplib should do with such strings.

I'd suggest changing SMTPConnection to encode the username/password to ASCII and see if anyone complains.