Closed
Bug 1138372
Opened 9 years ago
Closed 9 years ago
[contacts] Contacts app needs to register for text/directory MIME type for its open activity. (vcard attachments received from outlook/iphone 5 clients may not be opened by mail app while you can open them from Downloads)
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Tracking
(blocking-b2g:2.2+, b2g-v2.2 fixed, b2g-master fixed)
People
(Reporter: brg, Assigned: hola)
References
Details
Attachments
(4 files, 1 obsolete file)
Tested today using Flame+V18D- Gecko-75fc721.Gaia-1e2f3de. STR: - Configure mail account - Receive different vcf files from Android, Outlook, iphone 5S, iphone 6 and check the behaviour. Files sent from Android and iphone 6 are properly managed by mail app client. However files sent from Outlook(version 14.4.7 (141117)) and iphone 5S( Version: 8.0 (12A365)) are not opened in mail app client (see screenshot of the error shown) while if user goes to Downloads menu, those files are opened.
Reporter | ||
Comment 1•9 years ago
|
||
Tested with Friday build Flame-v18D-Gecko-c4a1019.Gaia-c1da118, the issue does not reproduce. Mail client app can open vcf files received from Iphone 5S and Outlook mail clients.
Comment 2•9 years ago
|
||
The answer probably has to do with our MIME type mapping in email being different than what the downloads logic is doing since we also have access to what the sending mail client sent us and we try to be clever with precedence. Do you have/can you provide a logcat from a run that reproduces? This will potentially save me a lot of time in figuring out what is going wrong, and is one of the reasons we always ask for a logcat. Thanks!
Flags: needinfo?(beatriz.rodriguezgomez)
Comment 3•9 years ago
|
||
logcat from iphone
Comment 5•9 years ago
|
||
So, per the logcat we're trying to trigger an activity using the "text/directory" MIME type. This is apparently a deprecated MIME type for the canonical text/vcard type per http://tools.ietf.org/html/rfc6350#section-10.1 along with "text/directory; profile=vcard" (which is still the same MIME type, but with a parameter), and "text/x-vcard". GAIA/apps/contacts/js/view/settings.js appears to be aware of the text/directory variants in its "onSdImport" function. The log indicates that the sender of the message has explicitly indicated the MIME type to be "text/directory" and the email app does not second guess it. (If it were "application/octet-stream" as the outlook.com web UI sent in my test, we would second guess and we would conclude the MIME type should be "text/vcard".) Since text/directory is a known MIME type for vcards and history has shown it's a bad idea from a security perspective to second-guess MIME types on the basis of file-extensions (or at least to use them inconsistently! :), I think the thing that makes the most sense here is for the contacts app to update its web activity filter to also process the "text/directory" MIME type in addition to "text/vcard" and "text/x-vcard" that is already supports. (The good news is this will not require a make reset-gaia, although b2g itself may need to be restarted for the new activity filter to be processed.) I'll provide a patch for this in a second.
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
Component: Gaia::E-Mail → Gaia::Contacts
Summary: vcard attachments received from outlook/iphone 5 clients are not opened by mail app while you can open them from Downloads → [contacts] Contacts app needs to register for text/directory MIME type for its open activity. (vcard attachments received from outlook/iphone 5 clients may not be opened by mail app while you can open them from Downloads)
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Comment on attachment 8571533 [details] [review] [gaia] asutherland:contacts-support-directory-mime-type > mozilla-b2g:master I'm providing what I think is a straightforward fix for this, but please feel free to take the bug and patch over if you would like something more involved. (I unfortunately won't be able to spend a lot of cycles on this.) This patch updates the manifest for a few places where it looks like all 3 MIME types were desired. I also noticed a potential bug in the handling of pick types. If pick was used with "text/x-vcard", it would not do the right thing, and if naively fixed, it would have accidentally exported the Facebook data, I believe.
Attachment #8571533 -
Flags: review?(jmcf)
Comment 8•9 years ago
|
||
Comment on attachment 8571533 [details] [review] [gaia] asutherland:contacts-support-directory-mime-type > mozilla-b2g:master I've tested the patch and it does not work. I'm unable to attach a vcard to an MMS message.
Attachment #8571533 -
Flags: review?(jmcf) → review-
Comment 9•9 years ago
|
||
As Andrew said that he cannot spend many cycles on this, I'm going to reassign this to Adrian.
Updated•9 years ago
|
Assignee: bugmail → hola
Updated•9 years ago
|
status-b2g-master:
--- → affected
Comment 10•9 years ago
|
||
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8572016 [details] [review] [gaia] ADLR-es:dep-vcard-mime-types > mozilla-b2g:master Based upon Andrew's patch.
Attachment #8572016 -
Flags: review?(jmcf)
Updated•9 years ago
|
Attachment #8571533 -
Attachment is obsolete: true
Comment 12•9 years ago
|
||
Comment on attachment 8572016 [details] [review] [gaia] ADLR-es:dep-vcard-mime-types > mozilla-b2g:master LGTM, thanks Adrian.
Attachment #8572016 -
Flags: review?(jmcf) → review+
Updated•9 years ago
|
Keywords: checkin-needed
Updated•9 years ago
|
Keywords: checkin-needed
Comment 13•9 years ago
|
||
Pull request has landed in master: https://github.com/mozilla-b2g/gaia/commit/5be5c54aa95e77b65a7168cc1e1ae7503470d485
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Target Milestone: --- → 2.2 S7 (6mar)
Reporter | ||
Comment 14•9 years ago
|
||
We had just tested Flame today build based in v18D from master( Gecko-71741ed.Gaia-a307d38) the vcard attachments received in mail app from Outlook and Iphone 5 can be opened. Thanks for fixing it.
Reporter | ||
Comment 15•9 years ago
|
||
We need this fix en 2.2 to make this feature fully work. It blocks bug 825318 approved to be in 2.2.
blocking-b2g: --- → 2.2?
status-b2g-v2.2:
--- → affected
Comment 16•9 years ago
|
||
triage: we need this to make the use case complete.
blocking-b2g: 2.2? → 2.2+
Assignee | ||
Comment 17•9 years ago
|
||
Comment on attachment 8572016 [details] [review] [gaia] ADLR-es:dep-vcard-mime-types > mozilla-b2g:master [Approval Request Comment] [Bug caused by] (feature/regressing bug #): Opening attachments from email. [User impact] if declined: Some vCard from outlook, iOS and others won't be opened from email. [Testing completed]: Manual testing, unit tests included. [Risk to taking this patch] (and alternatives if risky): Low risk, small change. If not taken, some vCards won't be recognized as a vCard file. [String changes made]: None.
Attachment #8572016 -
Flags: approval-gaia-v2.2?
Updated•9 years ago
|
Attachment #8572016 -
Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
Comment 18•9 years ago
|
||
(In reply to Beatriz Rodríguez [:brg] from comment #0) > Created attachment 8571286 [details] > 2015-03-02-12-10-24.png > > Tested today using Flame+V18D- Gecko-75fc721.Gaia-1e2f3de. > STR: > - Configure mail account > - Receive different vcf files from Android, Outlook, iphone 5S, iphone 6 and > check the behaviour. > > Files sent from Android and iphone 6 are properly managed by mail app client. > > However files sent from Outlook(version 14.4.7 (141117)) and iphone 5S( > Version: 8.0 (12A365)) are not opened in mail app client (see screenshot of > the error shown) while if user goes to Downloads menu, those files are > opened. Can you please help confirm the issue is fixed for you now ?
Reporter | ||
Comment 19•9 years ago
|
||
(In reply to bhavana bajaj [:bajaj] from comment #18) > Can you please help confirm the issue is fixed for you now ? yes-in master. I will check in 2.2 as soon as it lands there.
Comment 20•9 years ago
|
||
v2.2: https://github.com/mozilla-b2g/gaia/commit/6d41c604b95042876447c73ff8cafd079a5e869a
Reporter | ||
Comment 21•9 years ago
|
||
Tested with today build in Flame v2.2(Gecko-5d15383.Gaia-3f03223) the vcard files received from iphone 5 and Outlook are properly displayed. Thanks again to everyone helping to fix it.
Reporter | ||
Comment 22•9 years ago
|
||
After reading https://bugzilla.mozilla.org/show_bug.cgi?id=825318#c140, I will test again in few days :-)
Reporter | ||
Comment 23•9 years ago
|
||
Testing again version 2.2 after landing bug 825318, Gecko-fe5b385.Gaia-572d60e, the vcards received in mail client from Iphone5 and outlook are properly displayed. Thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•