Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP.login() uses invalid base64 enc. #37193

Closed
ondrass mannequin opened this issue Sep 18, 2002 · 4 comments
Closed

SMTP.login() uses invalid base64 enc. #37193

ondrass mannequin opened this issue Sep 18, 2002 · 4 comments
Labels
extension-modules C modules in the Modules dir

Comments

@ondrass
Copy link
Mannequin

ondrass mannequin commented Sep 18, 2002

BPO 611052

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2003-02-07.23:27:46.000>
created_at = <Date 2002-09-18.11:52:39.000>
labels = ['extension-modules']
title = 'SMTP.login() uses invalid base64 enc.'
updated_at = <Date 2003-02-07.23:27:46.000>
user = 'https://bugs.python.org/ondrass'

bugs.python.org fields:

activity = <Date 2003-02-07.23:27:46.000>
actor = 'ghaering'
assignee = 'ghaering'
closed = True
closed_date = None
closer = None
components = ['Extension Modules']
creation = <Date 2002-09-18.11:52:39.000>
creator = 'ondrass'
dependencies = []
files = []
hgrepos = []
issue_num = 611052
keywords = []
message_count = 4.0
messages = ['12443', '12444', '12445', '12446']
nosy_count = 3.0
nosy_names = ['nnorwitz', 'ghaering', 'ondrass']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue611052'
versions = ['Python 2.2']

@ondrass
Copy link
Mannequin Author

ondrass mannequin commented Sep 18, 2002

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)')

@ondrass ondrass mannequin closed this as completed Sep 18, 2002
@ondrass ondrass mannequin closed this as completed Sep 18, 2002
@ondrass ondrass mannequin assigned ghaering Sep 18, 2002
@ondrass ondrass mannequin added extension-modules C modules in the Modules dir labels Sep 18, 2002
@ghaering
Copy link
Mannequin

ghaering mannequin commented Oct 14, 2002

Logged In: YES
user_id=163326

Thanks for the bug report. This has already been fixed in
Python 2.3-CVS and the 2.2 maintenance branch. So just
upgrade to Python 2.2.2 when it'll be out tomorrow :-)

@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Feb 7, 2003

Logged In: YES
user_id=33168

Gerhard, can this be closed now?

@ghaering
Copy link
Mannequin

ghaering mannequin commented Feb 7, 2003

Logged In: YES
user_id=163326

Sure. Done.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir
Projects
None yet
Development

No branches or pull requests

0 participants