Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error on synchronizing incorrect vCard file #6711

Closed
nazar-pc opened this issue Sep 30, 2017 · 2 comments
Closed

Fatal error on synchronizing incorrect vCard file #6711

nazar-pc opened this issue Sep 30, 2017 · 2 comments

Comments

@nazar-pc
Copy link
Contributor

nazar-pc commented Sep 30, 2017

Steps to reproduce

  1. Upload incorrect vCard file to Nextcloud server (extract contacts.vcf.zip)
  2. Try to synchronize with desktop client (tested on Windows and Linux with 2.3.2)

Expected behaviour

File is synchronized

Actual behaviour

Fatal error on server

Important concern

The issue is that vCard is parsed. I'll submit an issue in Sabre project about parsing error, but I think Nextcloud shouldn't parse that file in the first place. It should just move files around regardless of their contents.

General server configuration

Operating system: Linux 5a063fefab69 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64

Web server: nginx/1.13.4 (fpm-fcgi)

Database: mysql 10.1.26

PHP version: 7.0.23

PHP-modules loaded
 - Core
 - date
 - libxml
 - openssl
 - pcre
 - sqlite3
 - zlib
 - ctype
 - curl
 - dom
 - fileinfo
 - filter
 - ftp
 - hash
 - iconv
 - json
 - mbstring
 - SPL
 - PDO
 - bz2
 - posix
 - readline
 - Reflection
 - session
 - SimpleXML
 - pdo_sqlite
 - standard
 - tokenizer
 - xml
 - xmlreader
 - xmlwriter
 - mysqlnd
 - cgi-fcgi
 - apcu
 - bcmath
 - Phar
 - exif
 - gd
 - gettext
 - mcrypt
 - mysqli
 - pdo_mysql
 - shmop
 - sockets
 - sysvmsg
 - sysvsem
 - sysvshm
 - zip
 - memcached
 - Zend OPcache

Nextcloud configuration

Nextcloud version: 12.0.3 - 12.0.3.3

Updated from an older Nextcloud/ownCloud or fresh install: Upgrade from 11

Where did you install Nextcloud from: https://github.com/nazar-pc/docker-webserver-apps/tree/master/nextcloud

Are you using external storage, if yes which one: files_external is disabled

Are you using encryption: no

Are you using an external user-backend, if yes which one: No

Signing status
[]
Enabled apps
 - activity: 2.5.2
 - bruteforcesettings: 1.0.2
 - calendar: 1.5.5
 - contacts: 1.5.3
 - dav: 1.3.0
 - federatedfilesharing: 1.2.0
 - files: 1.7.2
 - files_pdfviewer: 1.1.1
 - files_sharing: 1.4.0
 - files_texteditor: 2.4.1
 - files_trashbin: 1.2.0
 - files_versions: 1.5.0
 - files_videoplayer: 1.1.0
 - gallery: 17.0.0
 - issuetemplate: 0.2.2
 - logreader: 2.0.0
 - lookup_server_connector: 1.0.0
 - nextcloud_announcements: 1.1
 - notes: 2.3.1
 - notifications: 2.0.0
 - oauth2: 1.0.5
 - password_policy: 1.2.2
 - provisioning_api: 1.2.0
 - serverinfo: 1.2.0
 - spreed: 2.0.1
 - survey_client: 1.0.0
 - tasks: 0.9.5
 - twofactor_backupcodes: 1.1.1
 - twofactor_totp: 1.3.1
 - updatenotification: 1.2.0
 - workflowengine: 1.2.0
Disabled apps
 - admin_audit
 - comments
 - encryption
 - federation
 - files_external
 - firstrunwizard
 - sharebymail
 - systemtags
 - theming
 - user_external
 - user_ldap
Content of config/config.php
{
    "instanceid": "oc24sob5pzu8",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "\/data\/nginx\/www\/data",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "12.0.3.3",
    "dbname": "nextcloud",
    "dbhost": "mysql",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "logtimezone": "UTC",
    "installed": true,
    "maintenance": false,
    "theme": "",
    "loglevel": 2,
    "updater.release.channel": "stable"
}

Logs

Nextcloud log (data/nextcloud.log)
Sabre\VObject\ParseException: Invalid Mimedir file. Line starting at 13 did not follow iCalendar/vCard conventions

    /data/nginx/www/3rdparty/sabre/vobject/lib/Parser/MimeDir.php - line 234: Sabre\VObject\Parser\MimeDir->readProperty('=0ABaytown\\, LA...')
    /data/nginx/www/3rdparty/sabre/vobject/lib/Parser/MimeDir.php - line 181: Sabre\VObject\Parser\MimeDir->parseLine('=0ABaytown\\, LA...')
    /data/nginx/www/3rdparty/sabre/vobject/lib/Parser/MimeDir.php - line 89: Sabre\VObject\Parser\MimeDir->parseDocument()
    /data/nginx/www/3rdparty/sabre/vobject/lib/Reader.php - line 46: Sabre\VObject\Parser\MimeDir->parse('BEGIN VCARD\r\nVE...', 0)
    /data/nginx/www/3rdparty/sabre/dav/lib/CardDAV/Plugin.php - line 857: Sabre\VObject\Reader read('BEGIN VCARD\r\nVE...')
    /data/nginx/www/3rdparty/sabre/dav/lib/CardDAV/Plugin.php - line 782: Sabre\CardDAV\Plugin->convertVCard('BEGIN VCARD\r\nVE...', 'vcard3')
    [internal function] Sabre\CardDAV\Plugin->httpAfterGet(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /data/nginx/www/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
    /data/nginx/www/3rdparty/sabre/dav/lib/DAV/Server.php - line 491: Sabre\Event\EventEmitter->emit('afterMethod GET', Array)
    /data/nginx/www/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /data/nginx/www/apps/dav/lib/Server.php - line 258: Sabre\DAV\Server->exec()
    /data/nginx/www/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()
    /data/nginx/www/remote.php - line 162: require_once('/data/nginx/www...')
    {main}
@nazar-pc
Copy link
Contributor Author

Here is closed bug report in Sabre, looks like it is also Nextcloud's issue: https://github.com/fruux/sabre-dav/issues/1005

@jepode
Copy link

jepode commented Dec 30, 2017

I can confirm this bug:
Namely I try to download a (seemingly) broken VCF file (it is an exported contact list of Opera Mail/Webbrowser) as a plain file with the desktop client and the Linux client balks at this file and stops updating the affected sync folder.

Even if nextcloud tries to parse the file (and do what exactly with the parsed content?) I expect it to continue the sync process on a file level.

This is the error message in the admin log in the web frontend:
Fatal | webdav | Sabre\VObject\ParseException: This parser only supports VCARD and VCALENDAR files/snap/nextcloud/4371/htdocs/3rdparty/sabre/vobject/lib/Parser/MimeDir.php - line 89: Sabre\VObject\Parser\MimeDir->parseDocument()/snap/nextcloud/4371/htdocs/3rdparty/sabre/vobject/lib/Reader.php - line 46: Sabre\VObject\Parser\MimeDir->parse('Opera Hotlist v...', 0)/snap/nextcloud/4371/htdocs/3rdparty/sabre/dav/lib/CardDAV/Plugin.php - line 857: Sabre\VObject\Reader read('Opera Hotlist v...')/snap/nextcloud/4371/htdocs/3rdparty/sabre/dav/lib/CardDAV/Plugin.php - line 782: Sabre\CardDAV\Plugin->convertVCard('Opera Hotlist v...', 'vcard3')[internal function] Sabre\CardDAV\Plugin->httpAfterGet(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/snap/nextcloud/4371/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)/snap/nextcloud/4371/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 491: Sabre\Event\EventEmitter->emit('afterMethod GET', Array)/snap/nextcloud/4371/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/snap/nextcloud/4371/htdocs/apps/dav/lib/Server.php - line 258: Sabre\DAV\Server->exec()/snap/nextcloud/4371/htdocs/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()/snap/nextcloud/4371/htdocs/remote.php - line 162: require_once('/snap/nextcloud...'){main}
Affected Versions:
nextcloud snap version c53da15
running on Ubuntu 16.04

Desktop client Linux PPA Version 2.3.2

rullzer added a commit that referenced this issue Apr 23, 2018
Fixes #6711
Based on owncloud/core@f0fb21c

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
rullzer added a commit that referenced this issue May 1, 2018
Fixes #6711
Based on owncloud/core@f0fb21c

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
rullzer added a commit that referenced this issue May 24, 2018
Fixes #6711
Based on owncloud/core@f0fb21c

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
rullzer added a commit that referenced this issue May 27, 2018
Fixes #6711
Based on owncloud/core@f0fb21c

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
rullzer added a commit that referenced this issue May 29, 2018
Fixes #6711
Based on owncloud/core@f0fb21c

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
skjnldsv pushed a commit that referenced this issue May 30, 2018
Fixes #6711
Based on owncloud/core@f0fb21c

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants