GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.12] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) by encukou · Pull Request #123766 · python/cpython

Conversation

@encukou

@encukou encukou commented Sep 6, 2024 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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 [email protected]
(cherry picked from commit 4a153a1)

  • Issue: [CVE-2023-27043] Parsing errors in email/_parseaddr.py lead to incorrect value in email address part of tuple #102988

📚 Documentation preview 📚: https://cpython-previews--123766.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner @tdwyer @encukou
[3.12] [CVE-2023-27043] pythongh-102988: Reject malformed addresses i…
c5d9c5d
…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 <[email protected]>
(cherry picked from commit 4a153a1)
@encukou
encukou requested a review from a team as a code owner September 6, 2024 09:45
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 6, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 6, 2024
[CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() #111116
Merged
@bedevere-app bedevere-app Bot added type-bug An unexpected behavior, bug, or error type-security A security issue labels Sep 6, 2024
@ambv
ambv merged commit 1506824 into python:3.12 Sep 6, 2024
@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 6, 2024
@encukou encukou mentioned this pull request Sep 6, 2024
[3.12] gh-102988: Adjust version numbers in versionadded directives #123771
Merged
miketheman added a commit to miketheman/warehouse that referenced this pull request Sep 12, 2024
@miketheman
chore: remove unreachable condition
76dddcf
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 <[email protected]>
ewdurbin pushed a commit to pypi/warehouse that referenced this pull request Sep 13, 2024
@miketheman
chore: update Python 3.12.6 (#16700)
55ccaf7
* chore: update Python 3.12.6

Refs: https://www.python.org/downloads/release/python-3126/

Signed-off-by: Mike Fiedler <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Signed-off-by: Mike Fiedler <[email protected]>
@bedevere-app bedevere-app Bot mentioned this pull request Sep 6, 2024
[CVE-2023-27043] Parsing errors in email/_parseaddr.py lead to incorrect value in email address part of tuple #102988
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

type-bug An unexpected behavior, bug, or error type-security A security issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@encukou @ambv @vstinner
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.