Closed dilyanpalauzov closed 1 year ago
I use version 4.4.4 and Roundcube 1.6.0.
In the https://cal.aegee.org/dav/addressbooks/user/aaa/Default/ addressbook I have uploaded a vCard 4.0 contact with an JPEG image. Next is the content of /tmp/carddav_http.log and /tmp/carddav.log, once the vCards are loaded by rcmcarddav.
Thanks. RCMCardDAV does not currently handle data URIs, so the issue is clear. The simplest solution will probably be converting incoming vcards to version 3 before converting them to roundcube's internal format. This is supported bei sabre/vobject. Looking at the conversion code, apart to conversion between URI and BINARY properties (including PHOTO) it also converts date properties and KIND/MEMBER to the corresponding vcard3 extensions, which are handled by RCMCardDAV. The v4 dates include the option to omit the year, for example in a birthday. This is not supported with the roundcube contacts interface though and will show up as year 1604 (which sabre chooses as replacement, it appears to have special meaning for Apple clients).
Additionally, before attempting a download, I will check if the URI scheme is http or https. This means data URIs would not be supported in v3 vcards, but this should not be an issue as inline data is meant to be represented as BINARY property there.
On the outgoing side, for new contacts, we always create v3 vcards, so no issue here. For modified vcards, we can convert incoming cards that are not v3 to v3 first, and if the original version was v4 convert them back after the update. As far as I can see, the conversion process will not lose any important data when converting back and forth.
Found a couple of issues in vobject library that would need to be fixed first.
Filed a PR: sabre-io/vobject#602
Hello,
since I don't know how long it's going to take until a fixed sabre/vobject lib including my PR is released, I included a couple of workarounds in RCMCardDAV for now. Could you try the v4 branch to see if it resolves your issue?
Yes, this displays correctyl images from vCard 4.
Thanks, published this fix with release 4.4.6.
I have a vCard containing:
The CardDAV plugin writes in /tmp/carddav_http.log:
data:
URIs shall not be fetched over CURL.