From eca4872e3442990d69f442d8f48ceb47d1a27e94 Mon Sep 17 00:00:00 2001 From: Benedikt Johannes Date: Tue, 26 May 2026 14:59:00 +0200 Subject: [PATCH 1/3] gh-150474: Fix Email Header Parser issue t.token_type == 'attrtext' Contributed by Benedikt Johannes --- Lib/email/_header_value_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py index 792072ab9f6128..94e6ebbb0dc983 100644 --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -2583,7 +2583,7 @@ def get_parameter(value): for t in token: if t.token_type == 'extended-attrtext': break - t.token_type == 'attrtext' + t.token_type = 'attrtext' appendto.append(t) param.charset = t.value if value[0] != "'": From 51a65dde64b600bae74e4b320f3072dd1123d9cc Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 13:05:51 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst diff --git a/Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst b/Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst new file mode 100644 index 00000000000000..2afecb0e31ffdb --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst @@ -0,0 +1,2 @@ +Fixed an issue in :mod:`email` where an incorrect comparison in the header value parser :func:`get_parameter` could lead to improper parameter handling. +Patch contributed by Benedikt Johannes. From c4ad38cb97f43a10c216b3cce93c949bc1ba21a2 Mon Sep 17 00:00:00 2001 From: Benedikt Johannes Date: Tue, 26 May 2026 15:07:14 +0200 Subject: [PATCH 3/3] Update 2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst --- .../next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst b/Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst index 2afecb0e31ffdb..4327f288f1f029 100644 --- a/Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst +++ b/Misc/NEWS.d/next/Library/2026-05-26-13-05-48.gh-issue-150474.rMA2ig.rst @@ -1,2 +1,2 @@ Fixed an issue in :mod:`email` where an incorrect comparison in the header value parser :func:`get_parameter` could lead to improper parameter handling. -Patch contributed by Benedikt Johannes. +Patch by Benedikt Johannes.