Closed Bug 1663009 Opened 4 years ago Closed 4 years ago

setComposeDetails handling of commas in address names

Categories

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

defect

Tracking

(thunderbird_esr78+ fixed, thunderbird81 affected)

RESOLVED FIXED
82 Branch
Tracking Status
thunderbird_esr78 + fixed
thunderbird81 --- affected

People

(Reporter: musiquegraeme, Assigned: darktrojan)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

I started an email and one of the addresses was in the form Name, job <address>
I pressed send and my addon uses setComposeDetails to expand addresses.

Actual results:

setComposeDetails (in the compose API) expanded the address but now it was Name <> in pink. The address was sent correctly to setComposeDetails but it took the comma between name and job as indication of a new address and so somehow removed the rest of the "name" and the address.

Expected results:

It should have handled the comma in the name as part of the name and not an indication to start a new address.

(In reply to musiquegraeme from comment #0)

I started an email and one of the addresses was in the form Name, job <address>
I pressed send and my addon uses setComposeDetails to expand addresses.

Can you give an example of "expanding" addresses?

Flags: needinfo?(musiquegraeme)
Component: Untriaged → Message Compose Window

Not really significant - the point was simply that setComposeDetails took the addresses that were in getComposeDetails and mishandled any commas in the name. I just did another test where there was no mailing list entry but the addon got the details with getComposeDetails and then sent the same addresses back with setComposeDetails and turned an address with a comma in the name like Name , job <Address> into Name <>

Of course the answer to your question is that the addon in question PopMailListRecipients 2 and expands any mail lists in the addresses to the component emails.

Flags: needinfo?(musiquegraeme)

My Bug 1663067 reports similar symptoms.

See Also: → 1663067
Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Component: Message Compose Window → Add-Ons: Extensions API
Ever confirmed: true
Version: Thunderbird 81 → unspecified

Instead of just using strings as-is, use the header parser to read and reformat them. This resolves issues with commas.

Target Milestone: --- → 82 Branch

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/221920c8e758
Correctly interpret addresses passed as strings to setComposeDetails. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/db01f53031b8
follow-up - Fix a missed review comment. rs=me DONTBUILD

Comment on attachment 9173951 [details]
Bug 1663009 - Correctly interpret addresses passed as strings to setComposeDetails. r?mkmelin

[Approval Request Comment]
WX API correctness fix. Definitely should go to 78

Attachment #9173951 - Flags: approval-comm-esr78?

Comment on attachment 9173951 [details]
Bug 1663009 - Correctly interpret addresses passed as strings to setComposeDetails. r?mkmelin

[Triage Comment]
Approved for esr78

Attachment #9173951 - Flags: approval-comm-esr78? → approval-comm-esr78+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: