nextcloud / nextcloud/contacts

Incompliant (?) V3.0 vcard when exporting from Nextcloud

Open
#1,899 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: import
Dominant language
JavaScript
Stars
642
Forks
220
Avg merge
14h 39m
Merged PRs (30d)
51

Description

(Nextcloud 20.0.1, OpenSuse Leap 15.2)

Not sure if Contacs app or cardDAV specific, please advice if this issue should be opened in server repo.

https://docs.nextcloud.com/server/20/user_manual/en/pim/contacts.html?highlight=vcard#importing-virtual-contacts says that

The Contacts app only supports import of vCards version 3.0 and 4.0.

Importing this V4.0 vcard:

BEGIN:VCARD
VERSION:4.0
FN:Först Last
TEL;VALUE=uri;TYPE="CELL":tel:+491234567890
TEL;VALUE=uri;TYPE="VOICE,HOME":tel:+499876543210
END:VCARD

to my nextcloud is possible:
image

When exporting this contact, as Nextcloud offers (afaik?) only V3.0 exports, the following vcard is resulting:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.3.0//EN
FN:Först Last
TEL;TYPE=CELL:tel:+491234567890
TEL;TYPE="VOICE,HOME":tel:+499876543210
UID:444b38a4-3bda-4a53-a9e7-c40d357f69b5
REV;VALUE=DATE-TIME:20201028T122702Z
END:VCARD

RFC 6350 (VCARD 4.0) specifies, that V4.0 compliant TEL properties

... SHOULD be reset to a URI value.  It is expected that the URI scheme will be "tel", as
      specified in [RFC3966], but other schemes MAY be used.

(https://tools.ietf.org/html/rfc6350#section-6.4.1)

Whereas RFC 2426 (VCARD 3.0) specifies, that V3.0 compliant TEL properties should be

Type value: A single phone-number value.

Type special notes: The value of this type is specified in a
canonical form in order to specify an unambiguous representation of
the globally unique telephone endpoint. This type is based on the
X.500 Telephone Number attribute.

So IMHO the V3.0 exported vcard from nextcloud must not contain the "tel:" URI part, anymore.

Containing this URI "fragment" e.g. results in somewhat unusable Android contacts, when synched from Nextcloud via DAVx5: TEL property simply ignored, no phone numbers synched/detected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Contacts app's vCard export entry point and compare its VERSION:3.0 TEL output with the supplied RFC 2426 and RFC 6350 examples. Reproduce the export through CardDAV or DAVx5, then verify that exported contacts retain usable phone numbers in Android without breaking other contact fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.