Skip to content

[3.12] gh-80222: Fix email address header folding with long quoted-string (GH-122753)#129008

Merged
bitdancer merged 1 commit intopython:3.12from
miss-islington:backport-5aaf416-3.12
Jan 19, 2025
Merged

[3.12] gh-80222: Fix email address header folding with long quoted-string (GH-122753)#129008
bitdancer merged 1 commit intopython:3.12from
miss-islington:backport-5aaf416-3.12

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 19, 2025

Email generators using email.policy.default could incorrectly omit the
quote ('"') characters from a quoted-string during header refolding,
leading to invalid address headers and enabling header spoofing. This
change restores the quote characters on a bare-quoted-string as the
header is refolded, and escapes backslash and quote chars in the string.
(cherry picked from commit 5aaf416)

Co-authored-by: Mike Edmunds [email protected]

…ing (pythonGH-122753)

Email generators using email.policy.default could incorrectly omit the
quote ('"') characters from a quoted-string during header refolding,
leading to invalid address headers and enabling header spoofing. This
change restores the quote characters on a bare-quoted-string as the
header is refolded, and escapes backslash and quote chars in the string.
(cherry picked from commit 5aaf416)

Co-authored-by: Mike Edmunds <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants