sabre-io / Baikal

Baïkal is a Calendar+Contacts server
https://sabre.io/baikal/
GNU General Public License v3.0
2.47k stars 284 forks source link

large photo attributes make Baikal drop the connection #911

Open maichai opened 4 years ago

maichai commented 4 years ago

Baikal version: 0.4.6 on Synology DSM 6.2.2

Expected behaviour: if the Baikal server has an empty address book, when connecting the address book (e.g. using macOS app Contacts), and after importing hundreds of contacts, it is expected that all contacts are synced from e.g. macOS Contacts to Baikal server

Current behaviour: in the above scenario only a small fraction of the contacts (something between 80-260) are synced quite fast, then the syncing does not progress any more. The reason was isolated to vCards that contain large picture files. It seems that Baikal is not able to process large PHOTO attributes.

Steps to reproduce:

Install Baikal SKP 
Configure Baikal and set 1 user with 1 address book
Add this user account to e.g. macOS Contacts app
Import a vCard file including several contacts into the account in e.g. macOS Contacts
Upload a large picture file as contact photo into one contact
Select all contacts in e.g. macOS Contacts and export as vCard file
Modify the script https://github.com/ljanyst/carddav-util to do card.prettyPrint() if an upload exception occurs
Use carddav-util to upload the vCard file to Baikal 
See the upload throw an exception due to connection loss and print the vCard with the large picture
ByteHamster commented 4 years ago

Hi! Version 0.4.6 is pretty old. Have you tried updating? It would be interesting to see the server's stacktrace of the crash in the apache error_log file.

gruenie commented 4 years ago

For me the problem happens since version 0.6.1 (with mySQL-Database) when creating or updating a contact which includes a photo bigger than 10kb (Thunderbird/CardBook and DAVx5, former DAVDroid). In version 0.4.6.1 this problem did not exist for me. https://github.com/sabre-io/Baikal/issues/897