Closed Bug 1322145 Opened 8 years ago Closed 8 years ago

Signature containing file link to non-existent file and file-based image leads to wrong blocked content notification

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(thunderbird52+ fixed, thunderbird53 fixed)

RESOLVED FIXED
Thunderbird 53.0
Tracking Status
thunderbird52 + fixed
thunderbird53 --- fixed

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

References

Details

Attachments

(1 file, 1 obsolete file)

This signature

<html>
<body>
<img src='file://D:/Desktop/Dell%20Latitude%203150.png'><br>
<a href='file://D:/Desktop/BVG%20Preise%202016.pdf'>BVG</a>
</body>
</html>

leads to a blocked content notification for the PNG, not the PDF.

Without the PDF reference it works fine.

Without the PNG reference there is no blocked content notification.

I was just thinking: What about people who include their vCard via a file link? Maybe we should process links in signatures as well. Another bug for that?
Flags: needinfo?(mkmelin+mozilla)
Blocks: 1322155
Filed bug 1322173 for the links in signatures.
Flags: needinfo?(mkmelin+mozilla)
Huh? I don't get a notification for that. And we bail on setting up the notification for event.target.localName != "img" so I don't see how it would happen code wise either.
Hah, there is a trick ;-)

<html>
<body>
<img src='file://D:/Desktop/Dell%20Latitude%203150.png'><br>
<a href='file://D:/Desktop/BVG%20Preise%202016.pdf'>BVG</a>
</body>
</html>

And I happen to have renamed "BVG Preise 2016.pdf" to BVG-Preise-2016.pdf.

I don't know why these things happen to me. I find bugs that no one else finds. My first job in IT was testing and they hated me.
Summary: Signature containing file link and file-based image leads to wrong blocked content notification → Signature containing file link to non-existent file and file-based image leads to wrong blocked content notification
Works fine if the file exists. Sorry ;-(
Caused by faulty error handling in nsMsgCompose.cpp. The loop that replaces file URLs in the signature goes from the end and finds the non-existent PDF first. I gets an error and bails not processing the PNG.
There, I've done it for you.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #8817591 - Flags: review?(mkmelin+mozilla)
Fixed comment.
Attachment #8817591 - Attachment is obsolete: true
Attachment #8817591 - Flags: review?(mkmelin+mozilla)
Attachment #8817592 - Flags: review?(mkmelin+mozilla)
Comment on attachment 8817592 [details] [diff] [review]
1322145-sig-processing.patch (v1b).

Review of attachment 8817592 [details] [diff] [review]:
-----------------------------------------------------------------

Ah, great! r=mkmelin
Attachment #8817592 - Flags: review?(mkmelin+mozilla) → review+
C-C (TB 53): https://hg.mozilla.org/comm-central/rev/29b034f30fcb12b0e252a33502ba44521f5768d9
C-A (TB 52): https://hg.mozilla.org/releases/comm-aurora/rev/5c2c3abb9ae3885bd0558ed90671d15c5be367b2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 53.0
Attachment #8817592 - Flags: approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: