[Python-bugs-list] [ python-Bugs-611052 ] SMTP.login() uses invalid base64 enc.

noreply@sourceforge.net noreply@sourceforge.net
Wed, 18 Sep 2002 04:52:39 -0700


Bugs item #611052, was opened at 2002-09-18 13:52
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=611052&group_id=5470

Category: Extension Modules
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Ondrej Sury (ondrass)
Assigned to: Nobody/Anonymous (nobody)
Summary: SMTP.login() uses invalid base64 enc.

Initial Comment:
If you have veeery long username and/or password it encodes
it with '\n' after 80? characters.  This violates
(IMHO) smtp standard.
In following example look for \n characters.

O.

>>> from smtplib import SMTP
>>> s = SMTP('smtp.servery.cz')
>>> s.set_debuglevel(255)
>>>
s.login('veeeery.looooong.username@veeeeery.loooooong.domain',
'veeeeery.loooong.password')
send: 'ehlo shade.globe.cz\r\n'
reply: '250-smtp.cz\r\n'
reply: '250-AUTH LOGIN PLAIN\r\n'
reply: '250-AUTH=LOGIN PLAIN\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-STARTTLS\r\n'
reply: '250 8BITMIME\r\n'
reply: retcode (250); Msg: smtp.cz
AUTH LOGIN PLAIN
AUTH=LOGIN PLAIN
PIPELINING
STARTTLS
8BITMIME
AuthMethod: PLAIN
send: 'AUTH PLAIN
dmVlZWVyeS5sb29vb29uZy51c2VybmFtZUB2ZWVlZWVyeS5sb29vb29vbmcuZG9tYWluAHZlZWVl\ncnkubG9vb29vbmcudXNlcm5hbWVAdmVlZWVlcnkubG9vb29vb25nLmRvbWFpbgB2ZWVlZWVyeS5s\nb29vb25nLnBhc3N3b3Jk\r\n'
reply: '501 malformed auth input (#5.5.4)\r\n'
reply: retcode (501); Msg: malformed auth input (#5.5.4)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/smtplib.py", line 546, in login
    raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (501, 'malformed auth
input (#5.5.4)')


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=611052&group_id=5470