Closed Bug 1921765 Opened 1 month ago Closed 1 month ago

Use special care for decoding address headers in messages.getFull()

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(thunderbird_esr128 affected)

RESOLVED FIXED
133 Branch
Tracking Status
thunderbird_esr128 --- affected

People

(Reporter: TbSync, Assigned: TbSync)

References

Details

Attachments

(1 file)

No description provided.

This is a follow up to Bug 1919244. For convenience, the API has always
decoded the returned headers in messages.getFull(). That turned out to
make it impossible to parse certain headers. For example, the following
TO header

To: =?UTF-8?Q?H=C3=B6rst=2C_Kenny?= <K.Hoerst@invalid>, new@thunderbird.bug

was decoded to

To: Hörst, Kenny <K.Hoerst@invalid>, new@thunderbird.bug

This header can no longer be parsed correctly, because of the comma in
the first display name. The display name should now be quoted. The issue
seems to be specific to address headers and there is no global comma
based fix we could apply to all headers. Similar to jsmime [1], which is
using a dedicated parser for well known address headers, we will handle
these address headers separately as well. It is obviously not a perfect
fix, but the best we can do.

[1] : https://searchfox.org/comm-central/rev/e831583b72010c3ccce7d8ce928f2e54e905687d/mailnews/mime/jsmime/jsmime.mjs#154-177

Assignee: nobody → john
Status: NEW → ASSIGNED

Pushed by toby@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/6473d192e77f
Use special care for decoding address headers in messages.getFull(). r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: