summaryrefslogtreecommitdiffstats
path: root/Lib/email/_parseaddr.py
Commit message (Collapse)AuthorAgeFilesLines
* [2.7] bpo-34155: Dont parse domains containing @ (GH-13079) (GH-16006)Roberto C. Sánchez2019-09-141-1/+10
| | | | | | | | | | | | | This change skips parsing of email addresses where domains include a "@" character, which can be maliciously used since the local part is returned as a complete address. (cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9) Excludes changes to Lib/email/_header_value_parser.py, which did not exist in 2.7. Co-authored-by: jpic <jpic@users.noreply.github.com> https://bugs.python.org/issue34155
* Issue #14653: email.utils.mktime_tz() no longer relies on systemAlexander Belopolsky2012-06-221-4/+4
| | | | mktime() when timezone offest is supplied.
* Merged revisions 85179 via svnmerge fromR. David Murray2010-10-021-2/+7
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85179 | r.david.murray | 2010-10-02 11:58:26 -0400 (Sat, 02 Oct 2010) | 6 lines #1050268: make parseaddr 'quote' the contents of quoted strings in addresses. Also made the doc string for email._parseaddr's 'quote' function more accurate; I'd love to make the function match the old docstring instead, but other code uses it according the existing semantics. ........
* Merged revisions 84310 via svnmerge fromR. David Murray2010-08-251-0/+12
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84310 | r.david.murray | 2010-08-24 20:45:55 -0400 (Tue, 24 Aug 2010) | 8 lines #1194222: make parsedate always return RFC2822 four character years. Two character years are now converted to four character years using the Posix standard rule (<68 == 2000, >=68==1900). This makes the parsed date RFC2822 compliant even if the input is not. Patch and test by Jeffrey Finkelstein. ........
* Remove a dict.has_key() usage in email._parseaddr found while running -3.Brett Cannon2008-08-031-1/+1
|
* Tokio Kikuchi's fix for SF bug #1629369; folding whitespace allowed in theBarry Warsaw2007-03-121-2/+3
| | | | | | | | | display name of an email address, e.g. Foo \tBar <foo@example.com> Test case added by Barry.
* Port forward from 2.4 branch:Barry Warsaw2006-05-011-0/+1
| | | | | | | | | | Patch #1464708 from William McVey: fixed handling of nested comments in mail addresses. E.g. "Foo ((Foo Bar)) <foo@example.com>" Fixes for both rfc822.py and email package. This patch needs to be back ported to Python 2.3 for email 2.5.
* The email module's parsedate_tz function now sets the daylight savingsAnthony Baxter2006-04-031-1/+2
| | | | | | flag to -1 (unknown) since it can't tell from the date whether it should be set. patch from Aldo Cortesi
* Merge email package 4.0 from the sandbox, including documentation, test cases,Barry Warsaw2006-03-181-0/+7
| | | | and NEWS updates.
* parsedate_tz(): Minor cleanup.Barry Warsaw2006-02-031-3/+2
| | | | | Port from Python 2.3/email 2.5: Add a test for the tm_yday field is 1 in the return of parsedate().
* Big email 3.0 API changes, with updated unit tests and documentation.Barry Warsaw2004-10-031-1/+2
| | | | | | | | | | | | | | | | | Briefly (from the NEWS file): - Updates for the email package: + All deprecated APIs that in email 2.x issued warnings have been removed: _encoder argument to the MIMEText constructor, Message.add_payload(), Utils.dump_address_pair(), Utils.decode(), Utils.encode() + New deprecations: Generator.__call__(), Message.get_type(), Message.get_main_type(), Message.get_subtype(), the 'strict' argument to the Parser constructor. These will be removed in email 3.1. + Support for Python earlier than 2.3 has been removed (see PEP 291). + All defect classes have been renamed to end in 'Defect'. + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be added to messages that claim to be multipart but really aren't. + Updates to documentation.
* Resolution of bug #997368, "strftime() backward compatibility".Barry Warsaw2004-08-071-1/+1
| | | | | | | | | Specifically, time.strftime() no longer accepts a 0 in the yday position of a time tuple, since that can crash some platform strftime() implementations. parsedate_tz(): Change the return value to return 1 in the yday position. Update tests in test_rfc822.py and test_email.py
* Update to Python 2.3, getting rid of backward compatiblity crud.Barry Warsaw2004-05-091-9/+2
|
* AddressList.__str__(): Get rid of useless, and broken method. ClosesBarry Warsaw2003-06-131-3/+0
| | | | SF #753617. Back port candidate (but low priority).
* parsedate_tz(): Be slightly more lenient when there's no day of theBarry Warsaw2003-05-081-3/+2
| | | | | | | week. Patch given by Daniel Berlin in SF bug # 732761. Also closes SF bug # 727719. Backport candidate.
* getaddrlist(): Make sure this consumes all the data, and if there isBarry Warsaw2003-03-171-2/+2
| | | | | | | no address there (perhaps because of invalid characters, it appends ('', '') to the result set. Closes mimelib SF bug # 697641.
* parsedate_tz(): Fix SF bug #552345, optional FWS between the comma andBarry Warsaw2002-12-301-1/+8
| | | | the day in an RFC 2822 date.
* A code cleansing passBarry Warsaw2002-12-301-55/+74
|
* Port rfc822.py changes that didn't make it into this copy,Barry Warsaw2002-12-301-21/+35
| | | | | specifically that dots are allowed in obs-phrase. This fixes parsing of dots in realnames.
* Jason Mastaler's patch to break the dependence on rfc822.py for theBarry Warsaw2002-11-051-0/+441
address parsing routines. Closes SF patch #613434.