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

InvalidArgumentException on imported VCF files #488

Open
hakan42 opened this issue Aug 15, 2016 · 9 comments
Open

InvalidArgumentException on imported VCF files #488

hakan42 opened this issue Aug 15, 2016 · 9 comments
Labels
Milestone

Comments

@hakan42
Copy link

hakan42 commented Aug 15, 2016

Steps to reproduce

  1. Create a vcf file containing the line "BDAY:Jan 1, 1970"
  2. Import said VCF file
  3. See the "Contacts" app endlessly spin
  4. Get the "contacts" request from the web browser via Developer tools or somesuch
  5. Run the call on the shell

Expected behaviour

Birthday should be correctly imported, as this was working in earlier versions

Actual behaviour

The birthday triggers an error in sabredav. The curl call mentioned on step 4 shows:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>InvalidArgumentException</s:exception>
  <s:message>Invalid vCard date-time string: Jan 1, 1970</s:message>
</d:error>

This error is being thrown in 3rdparty/sabre/vobject/lib/DateTimeParser.php, line 299

Server configuration

Operating system:
Ubuntu 16.04

Web server:
nginx 1.9.15-0ubuntu1

Database:
postgresql-9.5

PHP version:
php :7.0+35ubuntu6

ownCloud version: (see ownCloud admin page)
ownCloud 9.1.0 (stable)

Contacts version: (see ownCloud apps page)
1.3.1.0

Updated from an older ownCloud or fresh install:
Fresh install, importing VCF from Android handset

Signing status (ownCloud 9.0 and above):
No errors have been found.

List of activated apps:

sudo -u www-data php /var/www/owncloud/occ app:list
Enabled:

  • activity: 2.3.2
  • calendar: 1.3.2
  • 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
  • mail: 0.5.2
  • 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": "ocew0yc1x0hf",
"passwordsalt": "_REMOVED SENSITIVE VALUE",
"secret": "_REMOVED SENSITIVE VALUE
",
"trusted_domains": [
"home.gurkensalat.com"
],
"datadirectory": "/var/www/owncloud/data",
"overwrite.cli.url": "https://home.gurkensalat.com/owncloud",
"dbtype": "pgsql",
"version": "9.1.0.15",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "_REMOVED SENSITIVE VALUE",
"dbpassword": "_REMOVED SENSITIVE VALUE
",
"logtimezone": "UTC",
"installed": true,
"mail_from_address": "owncloud",
"mail_smtpmode": "php",
"mail_domain": "tandogan.com"
}
}

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Google Chrome 52.0.2743.116 (Official Build) m (32-bit)

Operating system:
N/A

CardDAV-clients:
CardDAV-Sync 0.4.20

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Nothing in owncloud.log during import or later on page loading

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@hakan42 hakan42 changed the title InvalidArgumentException on BDAY values InvalidArgumentException on imported VCF files Aug 15, 2016
@hakan42
Copy link
Author

hakan42 commented Aug 15, 2016

As I have not yet run a sync against this freshly installed server (I value my contacts on my mobile too much ), I cannot say whether this exception would cause the CardDAV-Sync to fail mid-operation.

But, as I cannot retrive the full VCF file from the server, I would expect some kind of failure during sync. Hopefully nothing that deletes all my contacts 😈

@DeepDiver1975
Copy link
Member

<s:message>Invalid vCard date-time string: Jan 1, 1970/s:message

absolutly valid to throw this exception - see https://tools.ietf.org/html/rfc6350#section-6.2.5

Jan 1, 1970 is not a valid date format

@hakan42
Copy link
Author

hakan42 commented Aug 20, 2016

While the exception might be correct, the handling at the user level is truly broken.

It is possible to load such an entry into the database via the "import" function. But as soon as it is loaded, the GUI is unusable and therefore the user unable to fix the offending entry, assuming that he would even get a hint which entry is the culprit.

Therefore, I would like to reopen this issue and hope that the user interaction is somehow fixed.

@DeepDiver1975
Copy link
Member

So the invalid vcard could be imported?
I mssinterpreted your report then.

@hakan42
Copy link
Author

hakan42 commented Aug 21, 2016

Yes, the issue is that it is possible to introduce the broken entry into the database via import and then ìt is not possible anymore to use the GUI.

I believe it might have something to do with the calendar for "Contact Birthdays"

DeepDiver1975 added a commit to owncloud/core that referenced this issue Aug 22, 2016
@DeepDiver1975
Copy link
Member

I believe it might have something to do with the calendar for "Contact Birthdays"
@DeepDiver1975

no - it's a general import issue in core .... working on it ...

@DeepDiver1975
Copy link
Member

We will update sabre dav in 9.2 which will bring the vcard validation

@EgbertW
Copy link

EgbertW commented Jul 30, 2017

I found this issue using a search engine because I encountered the same problem. I imported a bad vcf file in OwnCloud 9.0.3 and since I get the spinning loader. I figured maybe updating would help so I updated to 10.0.2 today. While the import error may be fixed, the database itself is not fixed - there's still a broken VCF in there and no way to get it out.

I am currently trying to resolve this by manually finding and correcting the entry in the database, but it would be good to have a vcard validation in OwnCloud that when validation fails offers some way to correct or delete the offending entry rather than making the GUI completely unusable.

@aario
Copy link

aario commented Dec 21, 2018

Same here. It's sad to see the bug is still open since 2016.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants