[Python-bugs-list] [Bug #110621] rfc822.py module - address parsing problem (PR#235)
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 25 Sep 2000 08:06:28 -0700
Bug #110621, was updated on 2000-Jul-31 14:06
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: rfc822.py module - address parsing problem (PR#235)
Details: Jitterbug-Id: 235
Submitted-By: piers@cs.su.oz.au
Date: Tue, 14 Mar 2000 18:55:39 -0500 (EST)
Version: 1.5.2
OS: sunos
RFC822 specifies an address form known as a "domain literal",
eg: [132.151.1.21], but rfc822.parseaddr() incorrectly strips
the square brackets denoting special treatment of the contents.
(This routine is used by smtplib module, and thus causes it
to deliver messages using this form of address incorrectly.)
Here is an example:
: s ; python
Python 1.5.2 (#10, May 11 1999, 15:32:03) [GCC 2.8.1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import rfc822
>>> rfc822.parseaddr('guido@[132.151.1.21]')
('', 'guido@132.151.1.21')
>>>
====================================================================
Audit trail:
Mon May 22 17:36:36 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Sep-25 08:06
By: bwarsaw
Comment:
The patch is simple. Change line 706 (in the 2.0beta1 CVS tree) to read
return '[%s]' % self.getdelimited('[', ']\r', 0)
to rewrap the value in angle brackets. Will try to get this into 2.0beta2.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110621&group_id=5470