Repository navigation
gh-83938, gh-122476: Stop incorrectly RFC 2047 encoding non-ASCII email addresses #122540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0abca3e
Stop incorrectly RFC 2047 encoding non-ASCII email addresses
medmunds faa4006
Blurbs
medmunds f8f5eef
Merge branch 'main' into fix-issues-83938-122476
medmunds 99914e3
Merge branch 'main' into fix-issues-83938-122476
medmunds 819c0bc
Merge branch 'main' into fix-issues-83938-122476
medmunds bd6845d
fixup! Stop incorrectly RFC 2047 encoding non-ASCII email addresses
medmunds 61ac0d7
Merge branch 'main' into fix-issues-83938-122476
medmunds 43eaea1
fixup! Stop incorrectly RFC 2047 encoding non-ASCII email addresses
medmunds 5aafc33
Bump versionadded to 3.15
bitdancer 48c1cb1
Merge branch 'main' into fix-issues-83938-122476
bitdancer 3df70b6
fix inadvertent typo
bitdancer 8f3f6fd
Remove incomplete fix and temporarily disable new tests.
bitdancer f47e029
Move mime-parameter folding to top of loop.
bitdancer 73c7b6b
Fix the bug, update the doc changes.
bitdancer 0a259f4
Add some tests where the local part is folded.
bitdancer 6f5e5e1
Update doc changes
medmunds 6a6803e
Fix reference in docs
medmunds 71636d3
Merge branch 'main' into fix-issues-83938-122476
bitdancer fc31373
Fix typo in docs
medmunds 37f13db
Add whatsnew item
medmunds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Stop incorrectly RFC 2047 encoding non-ASCII email addresses
Email generators had been incorrectly flattening non-ASCII email addresses to RFC 2047 encoded-word format, leaving them undeliverable. (RFC 2047 prohibits use of encoded-word in an addr-spec.) This change raises a ValueError when attempting to flatten an EmailMessage with a non-ASCII addr-spec and a policy with utf8=False. (Exception: If the non-ASCII address originated from parsing a message, it will be flattened as originally parsed, without error.) Non-ASCII email addresses are supported when using a policy with utf8=True (such as email.policy.SMTPUTF8) under RFCs 6531 and 6532. Non-ASCII email address domains (but not localparts) can also be used with non-SMTPUTF8 policies by encoding the domain as an IDNA A-label. (The email package does not perform this encoding, because it cannot know whether the caller wants IDNA 2003, IDNA 2008, or some other variant such as UTS #46.)
- Loading branch information
commit 0abca3e10d13eb925e1a2f92627cf7f15ac67c01
There are no files selected for viewing
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.