Closed Bug 1921406 Opened 1 year ago Closed 23 days ago

Opening vcard (.vcf) from by double clicking the file does not work if .vcf contained more than one card

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 132
defect

Tracking

(thunderbird_esr128 affected, thunderbird_esr140 affected)

RESOLVED FIXED
146 Branch
Tracking Status
thunderbird_esr128 --- affected
thunderbird_esr140 --- affected

People

(Reporter: mkmelin, Assigned: mkmelin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Try to open a vcard (.vcf file) by double clicking in the OS file manager, or opening it from command line (like ./thunderbird -p test /tmp/test-vcard.vcf). does not work.

Error creating vCard properties TypeError: can't access property "encoding", params is undefined
    VCardPropertyEntry resource:///modules/VCardUtils.sys.mjs:555
    fromVCard resource:///modules/VCardUtils.sys.mjs:693
    AddrBookCard resource:///modules/AddrBookCard.sys.mjs:38
    get vCardProperties resource:///modules/AddrBookCard.sys.mjs:199
    get photoURL resource:///modules/AddrBookCard.sys.mjs:301
    editCurrentContact chrome://messenger/content/addressbook/aboutAddressBook.js:3431
    editNewContact chrome://messenger/content/addressbook/aboutAddressBook.js:3337
    <anonymous> chrome://messenger/content/addressbook/aboutAddressBookCommands.mjs:21
    doCommand resource:///modules/CommandController.mjs:55
    onLoad chrome://messenger/content/mailCore.js:459
    shouldSwitchTo chrome://messenger/content/addressbook/addressBookTab.js:56
    openTab chrome://messenger/content/tabmail.js:780
    toAddressBook chrome://messenger/content/mailCore.js:456
    toAddressBook chrome://messenger/content/mailCore.js:455
    handle resource:///modules/MessengerContentHandler.sys.mjs:655
AddrBookCard.sys.mjs:64:15

Found while working on https://phabricator.services.mozilla.com/D223675. Probably have existed for a good while...

In this case the card data had a trailing

BEGIN:VCARD
END:VCARD

... after the real data. The code assumes we must have just one card there. It tries to pars the "VCARD" as data and then obviously fails.

Summary: Opening vcard (.vcf) from by double clicking the file does not work → Opening vcard (.vcf) from by double clicking the file does not work if .vcf contained more than one card
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 146 Branch

Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/66e495758c52
Import .vcf does not work if .vcf contained more than one card. r=vineet

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

Attachment

General

Created:
Updated:
Size: