Closed Bug 1760365 Opened 4 years ago Closed 2 years ago

Copying of embedded image in multipart/related fails if image part doesn't have valid file extension

Categories

(MailNews Core :: MIME, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr102 wontfix)

RESOLVED FIXED
115 Branch
Tracking Status
thunderbird_esr102 --- wontfix

People

(Reporter: rachel, Assigned: betterbird.project)

Details

Attachments

(1 file)

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

Steps to reproduce:

Embed an image with this MIME part header:

Content-Type: image/png;
Content-Disposition: inline;
Content-Id: <part1.TV5L8Y6c.wkdr0xlN@example.com>
Content-Transfer-Encoding: base64

Trying to copy the image on Windows fails since Mozilla platform code tries to set the file extension here:
https://searchfox.org/mozilla-central/rev/7d379061bd56251df911728686c378c5820513d8/dom/base/nsCopySupport.cpp#648
This code only runs on Windows, see line 589 of the file.

The URL that is being mutated is the MailNews URL of the image part and the mutate fails, in a debug build even with a MOZ_ASSERT().

Attachment #9331112 - Flags: review?(mkmelin+mozilla)
Attachment #9331112 - Flags: review?(mkmelin+mozilla) → review+
Assignee: nobody → betterbird.project
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 115 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/51652881ac4a
Provide filename and extention to embedded image if none in header. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: