nextcloud / nextcloud/contacts
multiple N properties are forbidden and not repaired
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 642
- Forks
- 220
- Avg merge
- 14h 39m
- Merged PRs (30d)
- 51
Description
Steps to reproduce
- share a contact from user 1 to user 2
- switch to user 2
- try to change the "group" via user 2 to a contact entry from user 1
as requested from:
https://help.nextcloud.com/t/contacts-2-0-1-cant-change-group-on-shared-contacts/21870
Expected behaviour
contact get assigned to group
Actual behaviour
Sabre\DAV\Exception\UnsupportedMediaType: Validation error in vCard: N MUST NOT appear more than once in a VCARD component
/var/www/owncloud/3rdparty/sabre/dav/lib/CardDAV/Plugin.php - line 294: Sabre\CardDAV\Plugin->validateVCard('BEGIN VCARD\r\nVE...', false) [internal function] Sabre\CardDAV\Plugin->beforeWriteContent('addressbooks/us...', Object(Sabre\CardDAV\Card), 'BEGIN VCARD\r\nVE...', false) /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array) /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1128: Sabre\Event\EventEmitter->emit('beforeWriteCont...', Array) /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 513: Sabre\DAV\Server->updateFile('addressbooks/us...', 'BEGIN VCARD\r\nVE...', NULL) [internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array) /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array) /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /var/www/owncloud/apps/dav/lib/Server.php - line 258: Sabre\DAV\Server->exec() /var/www/owncloud/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec() /var/www/owncloud/remote.php - line 162: require_once('/var/www/ownclo...') {main}
Server configuration
nextcoud 12.0.3 wioth contact 2.0.1
Operating system:
ubuntu 16.04
Web server:
apache 2.4
Database:
mariadb 10
PHP version:
7.0
Nextcloud version: (see Nextcloud admin page)
12.0.3
Contacts version: (see Nextcloud apps page)
2.0.1
Updated from an older Nextcloud or fresh install:
updated
Signing status:
official via appstore
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the shared-contact group update described in the steps, then trace the CardDAV validation path from Sabre\DAV\Server::updateFile and Sabre\CardDAV\Plugin::validateVCard in the reported stack trace. Done means the contact can be assigned to a group without the duplicate N validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100