Closed Bug 583572 Opened 14 years ago Closed 3 years ago

vCard attachments (multipart/mixed;) are not shown in the attachment list with inline view enabled

Categories

(Thunderbird :: Message Reader UI, defect)

x86
All
defect
Not set
normal

Tracking

(thunderbird_esr91 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
thunderbird_esr91 --- fixed

People

(Reporter: intendentedelleacque, Assigned: henry-x)

References

Details

(Keywords: dataloss, testcase)

Attachments

(6 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.4) Gecko/20100608 If a message contains a vCard as attachment and Thunderbird fails to decode it properly, the attachment is not visible if the user choose "inline" view for attachments. Reproducible: Always Steps to Reproduce: 1. choose inline view for attachments 2. import the test message named "vcardTest.eml" uploaded here 3. click on it Actual Results: no vcard is shown neither in body message and in attachments list Expected Results: vcard should be shown in body message and/or in attachments list In my opinion this bug is caused by two reasons: a) for some reasons, Thunderbird fails to decode the attachment and so it's hidden b) the function "messageHeaderSink.handleAttachment" excludes attachment with content-type "text/x-vcard" from attachments list. This is not very consisent, because for other types of attachments the inline view doesn't prevent that the attachment is shown also in attachments list.
Keywords: dataloss
confirming on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0b3pre) Gecko/20100731 Shredder/3.2a1pre. Is this a regression ?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Attachment #461885 - Attachment mime type: message/rfc822 → text/plain
Summary: sometimes vCard attachments are not shown at all with inline view enabled → sometimes vCard attachments (multipart/mixed;) are not shown at all with inline view enabled
> Is this a regression ? intendentedelleacque, did you see this problem in version 2?
Component: Mail Window Front End → Message Reader UI
QA Contact: front-end → message-reader
I can confirm this bug in Thunderbird 17.0.6 running on Linux. I've sent an e-mail containing a .vcf file attachment from an Android device, the mail was received in Thunderbird, showed the attachment icon (clipper) but as soon as I clicked on the e-mail to see it the icon disappeared and the attachment didn't showed up.
I don't know if my situiation is exactly like this one, but it seems so close, I did noty file mine as a new bug: I reveived a few weeks ago an email containing a VCard plus a PDF attached. Untill today I did not notice the PDF. It became visible, because I printed my email (from Thunderbird). There I showed both attachments. On screen it shows "1 bijlge" (which is "1 attachment" in Dutch). See attached screen prints.
In thunderbird 38.8.0 on ubuntu (gnome) 64bit, the bug is still there...
Thunderbird 45.5 on my Arch Linux machine has the same problem :-(
Attachment is visible in eMail source and eMail size shows the correct size. But I can't neither see the attachment in the attachment list nor "download" the attachment from the eMail. As I got the mail the clipper icon (that shows, that the mail has an attachment) was shown. But after clicking the mail the clipper disappeared. eMail was generated by iPhone Mail.
This is simple to reproduce, create a card in Thunderbird email yourself and the card does not appear. In Thunderbird. This is a problem that it appears could be resolved in the short term by removing the exclusion from the function "messageHeaderSink.handleAttachment" of content-type "text/x-vcard"
The issue is still here in Thunderbird 52.7.0 on Ubuntu 17.10.
The issue is still here in Thunderbird 52.9.1 on Win7 Will this EVER be fixed?? Ridiculous. I need to .rar the file, and encrypt? You have to be kidding, from my android phone?
No lack of reports in this list https://mzl.la/2OYCULE Jorg, you have some of the most experience in the area of attachments
Flags: needinfo?(jorgk)
I can confirm that the message from attachment 461885 [details] doesn't show the vCard when viewing attachments inline. When not showing attachments inline, it shows as attachment (but can't be opened). Looks like it has to do with the vCard format. When I attach a vCard from TB using version 2.1 it does display properly: This works: ========= Content-Type: text/x-vcard; name="someone.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="someone.vcf" begin:vcard fn:First Last email;internet:mail@xx.com version:2.1 end:vcard This doesn't display and also doesn't open: ========= Content-Type: text/x-vcard; charset=UTF-8; name="vcard.vcf" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="vcard.vcf" BEGIN:VCARD VERSION:3.0 N;CHARSET=:Cognomè;Nomè FN;CHARSET=:NomèCognomè ADR;TYPE=WORK,POSTAL;CHARSET=:;;Via del Lavoro;Roma;;; ADR;TYPE=HOME,POSTAL;CHARSET=:;;Via di casa;Roma;;00100;Italia EMAIL;TYPE=PREF,INTERNET:email@provider.it URL;TYPE=HOME:http://www.pagin.org CATEGORIES;CHARSET=:Simpatici BDAY:2005-12-03 END:VCARD Looks like a friend of bug 1457108 :-( Note: Someone needs to make plan to support more modern vCard formats better.
Flags: needinfo?(jorgk) → needinfo?(mkmelin+mozilla)
See Also: → 1457108
Yep. The old code for this is beyond salvation though (and almost untouched since forever). Good news is it looks fairly self-contained.
Flags: needinfo?(mkmelin+mozilla)

This still exists in Thunderbird v60.5.3.

I sent a .vcf from my Samsung Android phone.

Please fix.

Thanks
Henry

Severity: major → normal

I confirm the problem is still present, only when "Display attachments inline".

"Bug 583572 Opened 9 years ago Updated 2 months ago"

Please don't post totally unrelated reports.

winmail.dat comes from Outlook clients, you can use https://addons.thunderbird.net/en-GB/thunderbird/addon/lookout-fix-version/ to open them.

You should report the issue with the large JPG attachments in another bug. That's an IMAP issue which I thought was fixed a while ago. We cannot handle this in this bug here.

Jorg

Sorry I thought it was related, when I found out that "Display attachments inline" affected how the file was handled.

I very very rarely have used Bugzilla and only happened to get emailed Jack's post because I had commented on this thread 6 months ago.

Thank you very much for the "LookOut-fix-version" link. That seems to make the attached files in the winmail.dat visible to me in Thunderbird for directly opening, downloading, etc. - That will save me time every time I get an email with attachmentd from that one contact!

Thanks

Hey all,
I attached my own vCard to outgoing mails via the account settings. But even this (Thunderbird internal created) vCard can't be displayed inline. And it's not possible to open it if it's displayed as attachment (aka 'not inline').
Is there any progress with this bug? I think it's a no go that Thunderbird can't handle its own created vCards, is it?

Ver: Thunderbird 68.10.0
OS: Linux Mint 20.1

@magus, given the increased usage of VCF attachments (we offer it as an address book export format) can we get this included along with the address book changes, so we do not look silly not being able to display something we export. Bacuase now it is an export option folk are sending one another address book lists.

This not exhaustive by any means, but these support topics indicate users are noticing and encountering issues with things simply having no visual appearance of existing.

https://support.mozilla.org/en-US/questions/1295533
https://support.mozilla.org/en-US/questions/1351107
https://support.mozilla.org/en-US/questions/1162984
https://support.mozilla.org/en-US/questions/1294222

Flags: needinfo?(mkmelin+mozilla)

Not sure if this bug is the same. For 91 at least, in this case bug 1717223 might be case.
I think the UI code for it is around here: https://searchfox.org/comm-central/rev/ddc5727d39202eaa94d280a4a5ba8d9532e5a9ec/mail/base/content/msgHdrView.js#662-717. IMO we could always list it as an attachment, but I would still not mark the message as having an attachment (since then real attachment emails are harder to find). I don't think it's very common nowadays to attach your vcard.

Henry, could you have a look at this?

Assignee: nobody → henry
Flags: needinfo?(mkmelin+mozilla)

Magnus

Whilst I have lots of experience of writing and changing code I have zero experience of working with this code!

So I do not know why you have assigned it to me?

Can someone please assign this to somebody with the relevant experience to finally get this bug fixed?

I do not even know how to do that, let alone how to alter and test the code, commit changes, etc., etc.....!

Thanks

Don't worry, it's assigned to another Henry ;)

Magnus
Ah! Sorry there are not many of us around (in my generation here in the UK at least) so I always assume I am the one! ;)

The original attachment in this bug actually currently works for me. I couldn't reproduce this using the account manger "Edit Card..." either. I wonder if anyone could provide a (minimal) vcard attachment that fails. I would also like to know if these vcards fail when being imported into the address book. I'm not that familiar with the vcard code, so I'm not sure if the VCardUtils.vCardToAbCard parser used for displaying inline attachments is the same as used elsewhere.

However, I can believe that this would easily fail because the parser seemed rather fragile (which is why I reported Bug 1717223, which magnus linked). Moreover, it fails silently https://searchfox.org/comm-central/rev/ddc5727d39202eaa94d280a4a5ba8d9532e5a9ec/mailnews/addrbook/modules/VCardUtils.jsm#308-313

It might make sense to make the failure non-silent to make this easier to debug. And the parser can probably be improved.

(In reply to Magnus Melin [:mkmelin] from comment #24)

IMO we could always list it as an attachment

I agree we should always show the attachment in the attachment list, the same as calendar invites. The convertToHTML parser cannot be relied on, and I can't think of a good way to test within handleAttachment whether a given vcard attachment was successfully shown inline.

but I would still not mark the message as having an attachment (since then real attachment emails are harder to find).

I don't really have a preference for not flagging it as having an attachment in the message tree. We currently show emails with calendar invites or pgp keys as having attachments, and it works fine. Plus, in terms of code, it would be less complex if we just allowed it to be shown as having an attachment, which is not incorrect.

But I've never sent or received vcards in my normal usage, so I don't know how frequently they are attached by people who do use them and if it would cause more annoyances than people attaching their pgp keys to their messages.

Note that before a vcard email is opened, it is currently shown as having an attachment, but this disappears when you first open it.

This bug may have been about something else initially.
Updating the summary, since it's not sometimes: if you check the View Attachments Inline then vCard attachments won't be shown. This happens for all messages AFAIK.

Traditionally (currently!) we do not mark the message as containing attachments if it's a vCard - see the code I linked. It's probably not worth changing that behavior. The disappearance you see is due to the desire to do exactly this: it's not possible to determine beforehand whether the email has an attachment or not, so we take an educated guess based on the mime type, then adjust if we see that "oh, it was just the person's vcard".

Summary: sometimes vCard attachments (multipart/mixed;) are not shown at all with inline view enabled → vCard attachments (multipart/mixed;) are not shown at all with inline view enabled

(In reply to Magnus Melin [:mkmelin] from comment #29)

This bug may have been about something else initially.
Updating the summary, since it's not sometimes: if you check the View Attachments Inline then vCard attachments won't be shown. This happens for all messages AFAIK.

Yes, the bug report was about cases where the attachment was shown neither inline nor in the attachment list. But I think its ok to broaden it to also include cases where it is shown inline, but not in the attachment list. I'll change the wording of the title a bit to emphasise the distinction between inline attachments and the attachment list.

Summary: vCard attachments (multipart/mixed;) are not shown at all with inline view enabled → vCard attachments (multipart/mixed;) are not shown in the attachment list with inline view enabled

(In reply to Magnus Melin [:mkmelin] from comment #29)

Traditionally (currently!) we do not mark the message as containing attachments if it's a vCard - see the code I linked. It's probably not worth changing that behavior. The disappearance you see is due to the desire to do exactly this: it's not possible to determine beforehand whether the email has an attachment or not, so we take an educated guess based on the mime type, then adjust if we see that "oh, it was just the person's vcard".

After thinking about the implementation, I'm less sure about hiding vcard attachments from the message tree. The current logic seems to follow that we hide it from the message tree because the vcard is not shown in the attachment list. You can see this in how markHasAttachments simply uses the length of the attachment list. Moreover, any user with either "mail.inline_attachments" or "mailnews.display.html_as" set to false, i.e. users that never see the vcard inline, currently will always see the vcard in the attachment list, and hence will see it marked as having an attachment in the message tree.

We are now going to always show vcards in the attachment list for all users, regardless of the preferences. So the previous logic would suggest we show the attachment in the message tree.

I think the argument for continuing to hide vcards attachments from the message tree despite this is because we want to avoid showing personal vcards that are attached to every message. However,

  1. We do not make this exception for pgp keys attached to messages.
  2. I'm not sure a user would understand why the message is shown as having no attachments in the message tree, but when they open it it has an attachment list. They would seem to give conflicting feedback, and it might be seen as a bug.
  3. There are cases where attached vcards are not personal vcards, like when sharing individual contacts or address books. In these cases, a user would probably want them to be listed as attachments in the message tree. I'm not sure how common this use of vcards is compared to people attaching personal vcards to every message. I imagine both are rare.

We could address the last point by only hiding vcard attachments from the message tree if they only contain one contact and the contact email matches the sender email. But this would require reading the attachment data, which is not readily available in the places where markHasAttachments is called. And it wouldn't address the other two points.

I personally think we should keep it simple and maintain the one-to-one relation between the attachment icon in the message tree and the existence of an attachment list.

It would be good to get some feedback from anyone who uses the "Attach my vCard to messages" preference for one of their accounts. We could only hide them for these accounts.

(In reply to Henry Wilkes [:henry] from comment #31)

We are now going to always show vcards in the attachment list for all users, regardless of the preferences. So the previous logic would suggest we show the attachment in the message tree.

That is how it's coded, but I think that was not completely the intention. The intention was simply to in all cases not to treat attached vcards as attachments.

I think the argument for continuing to hide vcards attachments from the message tree despite this is because we want to avoid showing personal vcards that are attached to every message. However,

  1. We do not make this exception for pgp keys attached to messages.

Yes and there is bug 1678220 complaining about exactly that. (Let's keep it separate, but maybe fix next.)

  1. I'm not sure a user would understand why the message is shown as having no attachments in the message tree, but when they open it it has an attachment list. They would seem to give conflicting feedback, and it might be seen as a bug.

I don't recall any bugs about this though. For the normal case that it's the personal vCard, there is really not much of a problem.

  1. There are cases where attached vcards are not personal vcards, like when sharing individual contacts or address books. In these cases, a user would probably want them to be listed as attachments in the message tree. I'm not sure how common this use of vcards is compared to people attaching personal vcards to every message. I imagine both are rare.

Attached vcard files with multiple cards is probably very rare. I don't think attaching personal vcards is super common nowadays either, but it used to be a thing back in early 2000s - I believe Outlook Express may have had it very prominently exposed.

It would be good to get some feedback from anyone who uses the "Attach my vCard to messages" preference for one of their accounts. We could only hide them for these accounts.

This is the wrong away around: it is all about received data so it doesn't matter what you have set in your own sending preferences.

(In reply to Magnus Melin [:mkmelin] from comment #32)

That is how it's coded, but I think that was not completely the intention. The intention was simply to in all cases not to treat attached vcards as attachments.

Yes, I thought the same. But then I'm unsure why this wasn't also done when "mail.inline_attachments" was set to false? Is it just that this case wasn't really considered? Some comments in the code would have helped.

Yes and there is bug 1678220 complaining about exactly that. (Let's keep it separate, but maybe fix next.)

Thanks, that's useful to know about. It would be good to have a consistent approach.

  1. I'm not sure a user would understand why the message is shown as having no attachments in the message tree, but when they open it it has an attachment list. They would seem to give conflicting feedback, and it might be seen as a bug.

I don't recall any bugs about this though. For the normal case that it's the personal vCard, there is really not much of a problem.

There wouldn't be bugs before because if the attachment list was visible, then necessarily the attachment icon would be visible in the message tree. We are going to break this when we show vcards in the attachment list, but hide them only in the message tree. But, I'm not sure if this will actually cause any problems in practice beyond some confusion. Note that the reverse (attachment icon in the tree => visible attachment list) is currently not true before the message was first opened (if the only attachments were vcards), but is true after that.

Attached vcard files with multiple cards is probably very rare. I don't think attaching personal vcards is super common nowadays either, but it used to be a thing back in early 2000s - I believe Outlook Express may have had it very prominently exposed.

The low usage is what makes it hard to decide. Thunderbird can export address books as vcards with more than one contact, so I thought there's a chance people use it to share address books over email.

It would be good to get some feedback from anyone who uses the "Attach my vCard to messages" preference for one of their accounts. We could only hide them for these accounts.

This is the wrong away around: it is all about received data so it doesn't matter what you have set in your own sending preferences.

I was just thinking about hiding it from their sent emails. But you're right that it wouldn't help if you received messages from someone who does this.

For now, I'll put together something like you suggested. I'll try and keep it simple, and we can adjust it when or if we get any feedback, or to match the pgp approach if we find a smart solution there.

There is only an indication in the UI that there is anything there at all if the view attachments inline is disabled or the view message body is set to something other than original HTML. There is no vcard shown, no nothing in Thunderbirds default display mode. Original HTML and show attachments inline.

(In reply to Matt from comment #34)

Created attachment 9242577 [details]
just an EML with an addressbook attached.

There is only an indication in the UI that there is anything there at all if the view attachments inline is disabled or the view message body is set to something other than original HTML. There is no vcard shown, no nothing in Thunderbirds default display mode. Original HTML and show attachments inline.

If it contains more than one vcard, see Bug 1717223

See Also: → 1717223

If we're showing vcards in the attachment list, should we also stop hiding vcards from printing? https://searchfox.org/comm-central/rev/5d49baed2e8cbcdac07bddc0ff879a1ef60bd53c/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp#400-405

Flags: needinfo?(mkmelin+mozilla)

Seems like we should show them yes.

Flags: needinfo?(mkmelin+mozilla)

However, we still hide the vcard attachments for the purposes of the message thread attachment icon.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b46b7a394b97
Always show vcard attachments in the attachment list. r=mkmelin

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
See Also: → 1678220
See Also: → 1735873

We should uplift this so that we can uplift boring bug 1678220, comment 18, methinks and Wayne.

Comment on attachment 9244339 [details]
Bug 583572 - Always show vcard attachments in the attachment list. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: vcards are inaccessible as attachments to users. If the vcard cannot be converted into a single contact shown inline, they are completely missing for the user.
Testing completed (on c-c, etc.): Briefly tested in browser_attachmentSize.js
Risk to taking this patch (and alternatives if risky): Low.

Attachment #9244339 - Flags: approval-comm-esr91?

Comment on attachment 9244339 [details]
Bug 583572 - Always show vcard attachments in the attachment list. r=mkmelin

[Triage Comment]
Approved for esr91 (been on beta for a week)

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

Attachment

General

Created:
Updated:
Size: