[issue6734] Imap lib implicit conversion from bytes to string

R. David Murray report at bugs.python.org
Wed Aug 19 17:10:38 CEST 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

See issue 1210 for background on the imaplib bytes/string issues.

A quick glance at the imaplib code leaves me confused.  _checkquote,
for example, appears to be mixing string comparisons and byte
comparisons.  Issue 1210 says imaplib _command should only quote
strings, but it does not appear at a quick glance to do any
quoting (the call to _checkquote is commented out).

It looks like the fix that would be consonant with the rest of
the code would be to convert the password to bytes using
the ASCII codec in the login method before calling _quote.

I'm adding Victor as nosy since he did the 1210 patch.

----------
nosy: +haypo, r.david.murray
priority:  -> normal
stage:  -> test needed
versions: +Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6734>
_______________________________________


More information about the Python-bugs-list mailing list