Open Bug 2074711 Opened 2 months ago Updated 1 month ago

Compose code mixes up URIs and URLs

Categories

(MailNews Core :: Composition, defect)

defect

Tracking

(Not tracked)

ASSIGNED
159 Branch

People

(Reporter: benc, Assigned: benc)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(1 external file)

There's a code path in nsMsgComposeService::OpenComposeWindow() which ends up performing a request (i.e. opening a channel) with a mailbox-message: URI. It works, but it really shouldn't (URIs are identifiers, not URLs that can be opened directly).

The main issue is where it creates a URL, but then calls SetSpec() upon it with the spec of the original URI:
https://searchfox.org/comm-central/rev/90bd327f5cc051c272663a523c15bc3cd0cb6549/mailnews/compose/src/nsMsgComposeService.cpp#1132-1135

The only reason it does this is to append a bunch of possible query params that were added to the URI (eg ?editasnew=true) further up the call stack. It's all a bit messy and redundant.
I think this is also the cause of Bug 2066307, so hopefully a fix here will sort that out too.

Keywords: leave-open
Attachment #9650305 - Attachment description: Bug 2074711 - Remove redundant function nsMsgComposeService::LoadDraftOrTemplate(). r=#thunderbird-back-end-reviewers → Bug 2074711 - Remove redundant function nsMsgComposeService::LoadDraftOrTemplate(). r=mkmelin
Target Milestone: --- → 159 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/68fda16c3ab6
Remove redundant function nsMsgComposeService::LoadDraftOrTemplate(). r=mkmelin

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: