summaryrefslogtreecommitdiffstats
path: root/Lib/email
Commit message (Collapse)AuthorAgeFilesLines
* [2.7] bpo-34155: Dont parse domains containing @ (GH-13079) (GH-16006)Roberto C. Sánchez2019-09-142-1/+24
| | | | | | | | | | | | | 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
* closes bpo-36712: Fix duplicate method in ↵Zackery Spytz2019-09-111-5/+0
| | | | Lib/email/test/test_email_renamed.py. (GH-14800)
* closes bpo-36711: Remove duplicate method in Lib/email/feedparser.py. (GH-14801)Zackery Spytz2019-09-111-20/+0
|
* bpo-30109: Fix reindent.py for non-ASCII files. (#5637)Serhiy Storchaka2018-02-121-1/+1
| | | | | It now processes files as binary streams. This also fixes "make reindent".
* bpo-31507: Add docstring to parseaddr function in email.utils.parseaddr ↵Rohit Balasubramanian2017-10-071-0/+6
| | | | | (GH-3647) (GH-3735) (cherry picked from commit 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2)
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-2/+2
|
* Correct misspellings of ISO-8859Martin Panter2016-08-103-4/+4
|
* Issue #27125: Fix various errors like “will [be] inherited”Martin Panter2016-05-291-1/+1
|
* Issue #27076: Doc, comment and test function name spelling fixesMartin Panter2016-05-261-1/+1
| | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.Serhiy Storchaka2015-11-101-1/+1
| | | | Use time.time instead of time.clock.
* Issue #6598: Increased time precision and random number range inSerhiy Storchaka2015-05-192-6/+28
| | | | email.utils.make_msgid() to strengthen the uniqueness of the message ID.
* Closes #19434: fix copy-paste error in MIMENonMultipart docstring.Georg Brandl2014-10-021-1/+1
|
* Decreased memory requirements of new tests added in issue21448.Serhiy Storchaka2014-08-121-1/+2
|
* Issue #21448: Fixed FeedParser feed() to avoid O(N**2) behavior when parsing ↵Serhiy Storchaka2014-08-122-11/+79
| | | | | | long line. Original patch by Raymond Hettinger.
* #14983: always add a line end after a MIME boundary marker.R David Murray2014-02-084-12/+22
| | | | | | | | | This is more RFC compliant (see issue) and fixes a problem with signature verifiers rejecting the part when signed. There is some amount of backward compatibility concern here since it changes the output, but the RFC issue coupled with fixing the problem with signature verifiers seems worth the small risk of breaking code that depends on the current incorrect output.
* Issue #19590: Use specific asserts in email tests.Serhiy Storchaka2013-11-162-157/+135
|
* #18437: fix comment typo.R David Murray2013-07-131-1/+1
|
* #17171: backport behavior-confirming test from python3.R David Murray2013-02-111-1/+18
|
* #16564: test to confirm behavior that regressed in python3.R David Murray2013-02-091-0/+15
| | | | | | Also add running of test_email_renamed to the email regrtest. It contains tests that the base email/tests/test_email.py does not, which I discovered while trying to backport this test for confirmation of the behavior.
* revert comment wording (#16714)Andrew Svetlov2012-12-191-1/+1
|
* Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-182-3/+3
| | | | Patch by Serhiy Storchaka.
* #15980: properly escape newlines in docstrings. Patch by Serhiy Storchaka.Ezio Melotti2012-09-212-3/+3
|
* #15232: correctly mangle From lines in MIME preamble and epilogueR David Murray2012-07-232-2/+33
|
* Fixed the name of the 'email.Utils' module in tests.Alexander Belopolsky2012-06-221-2/+2
|
* Issue #14653: email.utils.mktime_tz() no longer relies on systemAlexander Belopolsky2012-06-222-4/+10
| | | | mktime() when timezone offest is supplied.
* #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
|
* #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
|
* Lib/email/test/data/msg_26.txt had its line endings wrong in the SVN repository.Antoine Pitrou2011-03-051-45/+45
| | | | (they were probably converted right in working copies through an SVN property)
* Add updated .hgeol file and fix newlines in the 2.7 branch.Georg Brandl2011-03-051-45/+45
|
* Merged revisions 87873 via svnmerge fromR. David Murray2011-01-092-1/+20
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87873 | r.david.murray | 2011-01-08 21:35:24 -0500 (Sat, 08 Jan 2011) | 12 lines #5871: protect against header injection attacks. This makes Header.encode throw a HeaderParseError if it winds up formatting a header such that a continuation line has no leading whitespace and looks like a header. Since Header accepts values containing newlines and preserves them (and this is by design), without this fix any program that took user input (say, a subject in a web form) and passed it to the email package as a header was vulnerable to header injection attacks. (As far as we know this has never been exploited.) Thanks to Jakub Wilk for reporting this vulnerability. ........
* #1379416: encode charset name to ascii to avoid unicode promotion of outputR. David Murray2010-12-272-1/+8
|
* Merged revisions 87415 via svnmerge fromR. David Murray2010-12-212-1/+13
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87415 | r.david.murray | 2010-12-21 13:07:59 -0500 (Tue, 21 Dec 2010) | 4 lines Fix the change made for issue 1243654. Surprisingly, it turns out there was no test that exercised this code path. ........
* #1078919: document requirement to use triples for non-ascii add_header parms.R. David Murray2010-12-142-2/+22
|
* Merged revisions 87191 via svnmerge fromR. David Murray2010-12-121-12/+6
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87191 | r.david.murray | 2010-12-12 15:06:19 -0500 (Sun, 12 Dec 2010) | 6 lines #243654: only create a new MIME boundary if we don't already have one. The rearranged code should do exactly what the old code did, but the new code avoids a potentially costly re computation in the case where a boundary already exists. ........
* Merged revisions 85146 via svnmerge fromR. David Murray2010-12-061-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85146 | r.david.murray | 2010-10-01 16:38:33 -0400 (Fri, 01 Oct 2010) | 3 lines Fix docstring typo. ........
* Merged revisions 85130 via svnmerge fromR. David Murray2010-12-061-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85130 | r.david.murray | 2010-09-30 22:08:02 -0400 (Thu, 30 Sep 2010) | 2 lines Fix a couple spelling errors in comments and delete redundant __len__ def. ........
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-212-60/+60
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Merged revisions 85179 via svnmerge fromR. David Murray2010-10-022-2/+25
| | | | | | | | | | | | | | 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 85142 via svnmerge fromR. David Murray2010-10-012-1/+7
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85142 | r.david.murray | 2010-10-01 11:40:20 -0400 (Fri, 01 Oct 2010) | 5 lines #10004: in Q encoded word ignore '=xx' when xx is not valid hex. Bug report and fix by Thomas Guettler. ........
* Merged revisions 84310 via svnmerge fromR. David Murray2010-08-252-0/+25
| | | | | | | | | | | | | | | | 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. ........
* Merged revisions 83690 via svnmerge fromR. David Murray2010-08-043-2/+14
| | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83690 | r.david.murray | 2010-08-03 18:14:10 -0400 (Tue, 03 Aug 2010) | 10 lines #3196: if needed pad a short base64 encoded word before trying to decode. The RFCs encourage following Postel's law: be liberal in what you accept. So if someone forgot to pad the base64 encoded word payload to an even four bytes, we add the padding before handing it to base64mime.decode. Previously, missing padding resulted in a HeaderParseError. Patch by Jason Williams. ........
* Merged revisions 82922 via svnmerge fromR. David Murray2010-07-172-0/+37
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82922 | r.david.murray | 2010-07-16 21:19:57 -0400 (Fri, 16 Jul 2010) | 4 lines #1555570: correctly handle a \r\n that is split by the read buffer. Patch and test by Tony Nelson. ........
* #9085: email versions have gotten out of sync, 2.7 is actually 4.0.3.R. David Murray2010-06-261-1/+1
| | | | | | | | In 2.5 the email version was bumped to 4.0.2 just before release but after the maintenance branch was set up. The bump was not backported to trunk, and 2.6 went out the door with a version number of 4.0.1. I bumped this to 4.0.2 because of a behavior change, but that makes it look the same as 2.5. So bump it again to 4.0.3.
* #4487: have Charset check with codecs for possible aliases.R. David Murray2010-06-042-1/+10
| | | | | | | | | Previously, unexpected results occurred when email was passed, for example, 'utf8' as a charset name, since email would accept it but would *not* use the 'utf-8' codec for it, even though Python itself recognises that as an alias for utf-8. Now Charset checks with codecs for aliases as well as its own internal table. Issue 8898 has been opened to change this further in py3k so that all aliasing is routed through the codecs module.
* #5610: use \Z not $ so we don't eat extra chars when body part ends with \r\n.R. David Murray2010-06-032-1/+19
| | | | | | | | | | If a body part ended with \r\n, feedparser, using '$' to terminate its search for the newline, would match on the \r\n, and think that it needed to strip two characters in order to account for the line end before the boundary. That made it chop one too many characters off the end of the body part. Using \Z makes the match correct. Patch and test by Tony Nelson.
* #1368247: make set_charset/MIMEText automatically encode unicode _payload.R. David Murray2010-06-022-0/+27
| | | | | | | | Fixes (mysterious, to the end user) UnicodeErrors when using utf-8 as the charset and unicode as the _text argument. Also makes the way in which unicode gets encoded to quoted printable for other charsets more sane (it only worked by accident previously). The _payload now is encoded to the charset.output_charset if it is unicode.
* Issue #7472: remove unused code from email.encoders.encode_7or8bit.R. David Murray2010-05-052-7/+8
| | | | | | | | | Yukihiro Nakadaira noticed a typo in encode_7or8bit that was trying to special case iso-2022 codecs. It turns out that the code in question is never used, because whereas it was designed to trigger if the payload encoding was eight bit but its output encoding was 7 bit, in practice the payload is always converted to the 7bit encoding before encode_7or8bit is called. Patch by Shawat Anand.
* Bug 7755: audiotest.au is arguably copyrighted material, but definitely makesBarry Warsaw2010-05-051-0/+0
| | | | | Debian unhappy. The actual contents of the audio clip are unimportant, so replace it with something that we know is okay. Guido likes woodpeckers.
* Rephrase comment.Ezio Melotti2010-04-221-2/+2
|
* #8474: fix duplicate test in test_email.Ezio Melotti2010-04-221-5/+0
|