Skip to content

gh-99533: Fix issue where email.generator.Generator ignores policy when using multipart/signed #100204

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jackpendley
Copy link

@jackpendley jackpendley commented Dec 13, 2022

Provides fix for Issue #99533

The requested fix in the original issue report was implemented.

Removed _handle_multipart_signed from generator.py altogether so the headers folding no longer changes when accessing the whole message at once

…issue python#99533 where EmailMessage behaves differently when being set to multipart/signed mimetype
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@netlify
Copy link

netlify bot commented Dec 13, 2022

Deploy Preview for python-cpython-preview canceled.

Name Link
🔨 Latest commit 0058a1e
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/6397c86f676f720008e6cfc9

@ghost
Copy link

ghost commented Dec 13, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@bitdancer
Copy link
Member

bitdancer commented Dec 13, 2022

Have things been fixed so that unmodified headers are never refolded? If that has been done, then this works. However, if it is still the case that long headers get refolded when rendering an existing (not a new) message, then this will break re-rendering existing signed messages, which was the point of the original fix. The correct fix, obviously, is to never refold header lines that have not been modified since the message was deserialized, which is what I should have done originally (hindsight is wonderful :)

@python-cla-bot
Copy link

The following commit authors need to sign the Contributor License Agreement:

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants