summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.utils.rst
Commit message (Collapse)AuthorAgeFilesLines
* gh-121905: Consistently use "floating-point" instead of "floating point" ↵Serhiy Storchaka2024-07-191-1/+1
| | | | (GH-121907)
* gh-118798: Remove deprecated isdst parameter from `email.utils.localtime` ↵Hugo van Kemenade2024-05-091-2/+1
| | | | (#118799)
* docs: module page titles should not start with a link to themselves (#117099)Ned Batchelder2024-05-081-2/+2
|
* [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() ↵Victor Stinner2023-12-151-4/+15
| | | | | | | | | | (#111116) Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). Add an optional 'strict' parameter to getaddresses() and parseaddr() functions. Patch by Thomas Dwyer. Co-Authored-By: Thomas Dwyer <github@tomd.tel>
* gh-106669: Revert "gh-102988: Detect email address parsing errors ... ↵Gregory P. Smith2023-07-211-25/+1
| | | | | | | | (#105127)" (#106733) This reverts commit 18dfbd035775c15533d13a98e56b1d2bf5c65f00. Adds a regression test from the issue. See https://github.com/python/cpython/issues/106669.
* gh-102988: Detect email address parsing errors and return empty tuple to ↵Thomas Dwyer2023-07-101-1/+25
| | | | | | | | | indicate the parsing error (old API) (#105127) Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). This fixes or at least ameliorates CVE-2023-27043. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-72346: Added isdst deprecation warning to email.utils.localtime (GH-91450)Alan Williams2023-03-201-12/+10
|
* bpo-30681: Support invalid date format or value in email Date header (GH-22090)Georges Toth2020-10-271-2/+4
| | | | | | | | | | | | | | | | | | | | I am re-submitting an older PR which was abandoned but is still relevant, #10783 by @timb07. The issue being solved () is still relevant. The original PR #10783 was closed as the final request changes were not applied and since abandoned. In this new PR I have re-used the original patch plus applied both comments from the review, by @maxking and @pganssle. For reference, here is the original PR description: In email.utils.parsedate_to_datetime(), a failure to parse the date, or invalid date components (such as hour outside 0..23) raises an exception. Document this behaviour, and add tests to test_email/test_utils.py to confirm this behaviour. In email.headerregistry.DateHeader.parse(), check when parsedate_to_datetime() raises an exception and add a new defect InvalidDateDefect; preserve the invalid value as the string value of the header, but set the datetime attribute to None. Add tests to test_email/test_headerregistry.py to confirm this behaviour; also added test to test_email/test_inversion.py to confirm emails with such defective date headers round trip successfully. This pull request incorporates feedback gratefully received from @bitdancer, @brettcannon, @Mariatta and @warsaw, and replaces the earlier PR #2254. Automerge-Triggered-By: GH:warsaw
* bpo-38421: Update email.utils documentation (GH-16678)David K2019-11-121-2/+2
| | | | | | | | | | Updates documentation around email.utils.parsedate_tz(). Currently, the documentation specifies that when a string without a is timezone passed to parsedate_tz(), the last tuple is returned as ```None```. This is no longer true since Python 3.3 https://bugs.python.org/issue38421
* bpo-35035: Rename email.utils documentation to email.utils.rst (GH-10023)Zhiming Wang2018-11-211-0/+218
I'll watch for 404 on the old URL and will setup an HTTP redirection if needed.