Closed Bug 1736124 Opened 3 years ago Closed 2 years ago

vCard export does not include private WebPage URL

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr91+ fixed)

RESOLVED FIXED
96 Branch
Tracking Status
thunderbird_esr91 + fixed

People

(Reporter: moormaster, Assigned: u695164)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

Actual results:

The exported .vcf file only includes the url of the work web page for the created contact:

URL;VALUE=URL:http://work.example.com

Expected results:

Private and work web page urls should be included in the vCard

URL;TYPE=work;VALUE=URL:http://work.example.com
URL;TYPE=home;VALUE=URL:http://home.example.com

Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → nicolai
Status: NEW → ASSIGNED

There's also an underlying issue that if you edit contacts in the addressbook via aboutAddressBook.js the Home Webpage is not saved
Regressionrange: https://hg.mozilla.org/comm-central/rev/f8db8d2c72ba#l1.105

Umm its actually the Work Webpage that wasn't saved (Webpage1)

The value type should be text if i read https://datatracker.ietf.org/doc/html/rfc6350#section-4.2 correct.

Note that the value of a property of type "uri" is what the URI points to, not the URI itself.

Is there maybe a good reason why its VALUE=URL instead of VALUE=TEXT ?

(In reply to Nicolai Kasper from comment #4)

The value type should be text if i read https://datatracker.ietf.org/doc/html/rfc6350#section-4.2 correct.

Note that the value of a property of type "uri" is what the URI points to, not the URI itself.

Is there maybe a good reason why its VALUE=URL instead of VALUE=TEXT ?

https://datatracker.ietf.org/doc/html/rfc6350#section-5.2

The Value Parameter is optional and and the given value props are just predefined. URL seems fine for this case.

So far we exported only the Work URL.
My solution would be the following:

Exporting the URL(s) with the type=home or type=work.

If you Import Address books (via vCard) from older Thunderbird Versions we do need a workaround. Otherwise the URL will not be used with the new types (type=home or type=work).
Importing a URL without any type isn't really supported by our UI so far.
That's why i would go for the solution that when Importing a vCard without any type specification it would behave as prior to this patch.
This means that the first URL without any type will be specified as Work Web Page.
If a URL with type=work is specified in the imported vCard the workaround will be dropped and the URL without any type specification is not imported at all.

Sounds like a reasonable approach.

If you Import Address books (via vCard) from older Thunderbird Versions we do need a workaround. Otherwise the URL will not be used with the new types (type=home or type=work).
Importing a URL without any type isn't really supported by our UI(abCard) so far.
That's why i would go for the solution that when Importing a vCard without any type specification it would behave as prior to this patch.
This means that the first URL without any type will be specified as Work Web Page.
If a URL with type=work is specified in the imported vCard the workaround will be dropped and the URL without any type specification is not imported at all.

Depends on D131249

If you import a vCard with a URL wihout a type specification like:

URL;VALUE=URL:http://work.example.com

and then export it, the vCard is slightly changed in comparison to the imported one.
As the export of the URL now contains a type:

URL;TYPE=work;VALUE=URL:http://work.example.com

(In reply to Nicolai Kasper from comment #10)

If you import a vCard with a URL wihout a type specification like:

URL;VALUE=URL:http://work.example.com

and then export it, the vCard is slightly changed in comparison to the imported one.
As the export of the URL now contains a type:

URL;TYPE=work;VALUE=URL:http://work.example.com

Yeah, I'm not too happy about this, but to prevent it is another can of worms.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/caf669cc0998
Edit Contact in Tab saves Home Webpage. r=mkmelin
https://hg.mozilla.org/comm-central/rev/0b2a7b3333c5
Addressbook vCard exports and imports with work and home url. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Nicolai, please request uplift to comm-esr91 (click the details, set that flag to ? and fill out the details)

Comment on attachment 9250929 [details]
Bug 1736124 - Edit Contact in Tab saves Home Webpage. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): Bug 1708572
User impact if declined: Work Web Page is not saved in the Address Book
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky): None, the Work Web Page was not saved.

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

Comment on attachment 9250930 [details]
Bug 1736124 - Addressbook vCard exports and imports with work and home url. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): Bug 1639430
User impact if declined: Exporting the Address Book as vCard doesnt contain Home Web Page.
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky): If a vCard is imported without a type specification in the URL its treated as a Work Web Page. This would change the vCard data if imported in Thunderbrid and then exported as vCard. A type=work is added.

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

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

Nicolai, please request uplift to comm-esr91 (click the details, set that flag to ? and fill out the details)

Thanks for the reminder!

Comment on attachment 9250929 [details]
Bug 1736124 - Edit Contact in Tab saves Home Webpage. r=mkmelin

[Triage Comment]
Approved for esr91

Attachment #9250929 - Flags: approval-comm-esr91? → approval-comm-esr91+

Comment on attachment 9250930 [details]
Bug 1736124 - Addressbook vCard exports and imports with work and home url. r=mkmelin

[Triage Comment]
Approved for Esr91

Attachment #9250930 - Flags: approval-comm-esr91? → approval-comm-esr91+

The first changeset introduced some unwanted white-space changes tripping up the linter.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: