[3.12] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116)#123766
Merged
ambv merged 1 commit intopython:3.12from Sep 6, 2024
Merged
Conversation
…n email.parseaddr() (pythonGH-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> (cherry picked from commit 4a153a1)
miketheman
added a commit
to miketheman/warehouse
that referenced
this pull request
Sep 12, 2024
Now that Python validates the addresses more strictly, we won't hit the condition any longer. If we wish to preserve this condition, we could also pass `strict=False` to `getaddresses()`, but that seems to be counter to our desire of having a valid email address. Refs: python/cpython#123766 Signed-off-by: Mike Fiedler <miketheman@gmail.com>
ewdurbin
pushed a commit
to pypi/warehouse
that referenced
this pull request
Sep 13, 2024
* chore: update Python 3.12.6 Refs: https://www.python.org/downloads/release/python-3126/ Signed-off-by: Mike Fiedler <miketheman@gmail.com> * chore: remove unreachable condition Now that Python validates the addresses more strictly, we won't hit the condition any longer. If we wish to preserve this condition, we could also pass `strict=False` to `getaddresses()`, but that seems to be counter to our desire of having a valid email address. Refs: python/cpython#123766 Signed-off-by: Mike Fiedler <miketheman@gmail.com> * test: refactor test case to parametrize Extract test cases from inline to make it clearer which permutations are being tested. Signed-off-by: Mike Fiedler <miketheman@gmail.com> --------- Signed-off-by: Mike Fiedler <miketheman@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
(cherry picked from commit 4a153a1)
📚 Documentation preview 📚: https://cpython-previews--123766.org.readthedocs.build/