-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
gh-121650: Encode newlines in headers, and verify headers are sound #122233
Merged
encukou
merged 12 commits into
python:main
from
encukou:gh-121650-email-newlines-in-headers
Jul 30, 2024
Merged
gh-121650: Encode newlines in headers, and verify headers are sound #122233
encukou
merged 12 commits into
python:main
from
encukou:gh-121650-email-newlines-in-headers
Jul 30, 2024
Commits on Jul 24, 2024
-
Verify that email headers are well-formed
This should fail for custom fold() implementations that aren't careful about newlines.
Configuration menu - View commit details
-
Copy full SHA for 921cbfd - Browse repository at this point
Copy the full SHA 921cbfdView commit details -
Encode header parts that contain newlines
Per RFC 2047: > [...] these encoding schemes allow the > encoding of arbitrary octet values, mail readers that implement this > decoding should also ensure that display of the decoded data on the > recipient's terminal will not cause unwanted side-effects It seems that the "quoted-word" scheme is a valid way to include a newline character in a header value, just like we already allow undecodable bytes or control characters. They do need to be properly quoted when serialized to text, though. --- Credit for an earlier attempt: Co-Authored-By: Bas Bloemsaat <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bd7f922 - Browse repository at this point
Copy the full SHA bd7f922View commit details
Commits on Jul 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 59c06c3 - Browse repository at this point
Copy the full SHA 59c06c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e7d6f1 - Browse repository at this point
Copy the full SHA 8e7d6f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef65562 - Browse repository at this point
Copy the full SHA ef65562View commit details -
I'm not touching other instances in this file, since this PR might be backported to very old versions.
Configuration menu - View commit details
-
Copy full SHA for 64dcb44 - Browse repository at this point
Copy the full SHA 64dcb44View commit details
Commits on Jul 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for af41733 - Browse repository at this point
Copy the full SHA af41733View commit details
Commits on Jul 30, 2024
-
Apply suggestions from code review
Co-authored-by: Serhiy Storchaka <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 596a25b - Browse repository at this point
Copy the full SHA 596a25bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7f5fc6 - Browse repository at this point
Copy the full SHA d7f5fc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a768a81 - Browse repository at this point
Copy the full SHA a768a81View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb43fe4 - Browse repository at this point
Copy the full SHA eb43fe4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f793b96 - Browse repository at this point
Copy the full SHA f793b96View commit details
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.