-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
base: main
Are you sure you want to change the base?
Conversation
…issue python#99533 where EmailMessage behaves differently when being set to multipart/signed mimetype
…part_signed would resolve issue python#99533
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
✅ Deploy Preview for python-cpython-preview canceled.
|
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 :) |
The following commit authors need to sign the Contributor License Agreement: |
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
multipart/signed
→ ruins signing #99533