[3.13] gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) (#131403)
gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) Email generators using email.policy.default may convert an RFC 2047 encoded-word to unencoded form during header refolding. In a structured header, this could allow 'specials' chars outside a quoted-string, leading to invalid address headers and enabling spoofing. This change ensures a parsed encoded-word that contains specials is kept as an encoded-word while the header is refolded. [Better fix from @bitdancer.] --------- (cherry picked from commit 295b53df2aa18deb625a7da41f7e4babfe6ef34b) Co-authored-by: Mike Edmunds <medmunds@gmail.com> Co-authored-by: R David Murray <rdmurray@bitdance.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
M
Miss Islington (bot) committed
31767e61008c404e51c415b86b443baf2318bfdf
Parent: 85c2037
Committed by GitHub <noreply@github.com>
on 3/18/2025, 7:34:00 PM