contacts icon indicating copy to clipboard operation
contacts copied to clipboard

[CardDAV] LABEL doesn't change when ADR is modified in Web UI

Open rfc2822 opened this issue 7 years ago • 1 comments

Steps to reproduce

  1. Create a contact with a home address. For instance, create a user "Alpha Beta" and use PO Box "1", street address "Street 2", postal code "333", city "Virtual", country "Schland" as address.
  2. Download the VCard using CardDAV:
GET …/owncloud/remote.php/dav/addressbooks/users/test/default/bc2620f7-2ed3-4f5f-9404-b2bafd12ae16.vcf http/1.1
Accept: text/vcard;version=4.0, text/vcard;charset=utf-8;q=0.8, text/vcard;q=0.5
…

It will look like this:

BEGIN:VCARD
VERSION:4.0
PRODID:-//Sabre//Sabre VObject 3.5.0//EN
FN:Alpha Beta
UID:bc2620f7-2ed3-4f5f-9404-b2bafd12ae16
ADR;TYPE=HOME:1;;Street 2;Virtual;;333;Schland
END:VCARD

Note there's no LABEL in the ADR property, so that clients will generated the formatted address themselves.

  1. When a client modifies the VCard (for instance, "street 2" is changed to "street 2a") and adds a LABEL for its representation, it will upload something like this:
PUT …
Content-Type: text/vcard;version=4.0

BEGIN:VCARD
VERSION:4.0
PRODID:+//IDN bitfire.at//DAVdroid/1.2.3-gplay vcard4android ez-vcard/0.9.1
 1
UID:bc2620f7-2ed3-4f5f-9404-b2bafd12ae16
FN:Alpha Beta
N:Beta;Alpha;;;
ADR;LABEL=Street 2a^n1^nVirtual 333^nSchland;TYPE=home:1;;Street 2a;Virtual
 ;;333;Schland
REV:20160901T213222Z
END:VCARD

Here, the LABEL has been set (and RFC 6868 has been used for the line breaks).

  1. Now, when you look in the OwnCloud Contacts again, everything is correct (street is "Street 2a").
  2. However, if you then change "Street 2a" to "Street 3a", OwnCloud Contacts will update the formatted address, but not the LABEL:
BEGIN:VCARD
VERSION:4.0
PRODID:-//Sabre//Sabre VObject 3.5.0//EN
UID:bc2620f7-2ed3-4f5f-9404-b2bafd12ae16
FN:Alpha Beta
N:Beta;Alpha;;;
ADR;LABEL="Street 2a^n1^nVirtual 333^nSchland";TYPE=home:1;;Street 3a;Virtu
 al;;333;Schland
REV:20160901T213222Z
END:VCARD
  1. If you then synchronize this VCard to another client, it will be confused and show the LABEL address with the (incorrect) "Street 2a" as formatted address, but when editing the components, it will (correctly) show "Street 3a".

Expected behaviour

The LABEL parameter of the ADR property should be handled correctly. For instance, it could be dismissed when a change i done in the Web UI. However, an incorrect LABEL should never be sent.

Actual behaviour

LABEL is stored when received, and then sent without modification, even when the content of the address field has been modified in the OwnCloud Contacts app.

Server configuration

Operating system: Description: Debian GNU/Linux 8.5 (jessie)

Web server: Server version: Apache/2.4.10 (Debian)

Database: mysql-server (5.5.50-0+deb7u2)

PHP version: 5.6.20+dfsg-0+deb8u1

ownCloud version: (see ownCloud admin page) 9.1.0

Contacts version: (see ownCloud apps page) 1.3.1.0

Updated from an older ownCloud or fresh install: fresh install

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.3.2
  - calendar: 1.3.3
  - comments: 0.3.0
  - contacts: 1.3.1.0
  - dav: 0.2.5
  - federatedfilesharing: 0.3.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.10.0
  - files_texteditor: 2.1
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.0
  - notifications: 0.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - tasks: 0.9.3
  - templateeditor: 0.1
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - files_antivirus
  - files_external
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "ockii5e7dtm3",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "debian-test.lan"
        ],
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "http:\/\/debian-test.lan\/owncloud",
        "dbtype": "mysql",
        "version": "9.1.0.15",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "appstore.experimental.enabled": false,
        "loglevel": 2
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

**Are you using an external user-backend, if yes which no

rfc2822 avatar Sep 01 '16 21:09 rfc2822