[Calypso] calypso with davdroid: in the direction of principals

Jelmer Vernooij jelmer at samba.org
Sat May 24 16:24:00 PDT 2014


On Wed, Apr 16, 2014 at 02:05:31AM +0200, Jelmer Vernooij wrote:
> On Wed, Apr 16, 2014 at 12:03:05AM +0200, chrysn wrote:
> > hello,
> > 
> > thanks for your reviews.
> > 
> > On Tue, Apr 15, 2014 at 03:01:37AM +0200, Jelmer Vernooij wrote:
> > > I can confirm that this works with DAVDroid. I needed the attached
> > > patch though, since I'm using fake ACLs.
> > 
> > indeed, i missed that. included in my integration branch now.
> > 
> > > There are some other rough edges (not introduced by this patch). For
> > > example, I have a couple of invalid vcards (no FN) that cause
> > > tracebacks from calypso and then empty files in the repository.
> > 
> > could you send a traceback and an exemplary file?
> I haven't yet worked out which file is problematic, but here is the
> traceback:
> 
> Traceback (most recent call last):
>   File "/home/jelmer/calypso/calypso/__init__.py", line 455, in do_PUT
>     xmlutils.put(self.path, webdav_request, self._collection, context=context)
>   File "/home/jelmer/calypso/calypso/xmlutils.py", line 238, in put
>     collection.append(name, webdav_request, context=context)
>   File "/home/jelmer/calypso/calypso/webdav.py", line 491, in append
>     self.create_file(new_item, context=context)
>   File "/home/jelmer/calypso/calypso/webdav.py", line 421, in create_file
>     path = self.write_file(item)
>   File "/home/jelmer/calypso/calypso/webdav.py", line 402, in write_file
>     file.write(item.text.encode('utf-8'))
>   File "/home/jelmer/calypso/calypso/webdav.py", line 169, in text
>     return self.object.serialize().decode('utf-8')
>   File "/usr/lib/pymodules/python2.7/vobject/base.py", line 186, in serialize
>     return behavior.serialize(self, buf, lineLength, validate)
>   File "/usr/lib/pymodules/python2.7/vobject/behavior.py", line 148, in serialize
>     if validate: cls.validate(obj, raiseException=True)
>   File "/usr/lib/pymodules/python2.7/vobject/behavior.py", line 91, in validate
>     raise base.ValidateError(m % (cls.name, val[0], key))
> ValidateError: 'VCARD components must contain at least 1 FN'
> 
> With that error message, it should be fairly easy to reproduce.
FWIW I've disabled validation for vcf/ics files for the moment, which
makes the CalDav and CardDav clients happy. Technically this may not
be 100% compliant to the standard since they're missing a required
component (FN) but none of the clients I use seem to mind that, and
it's better than failing PUT requests.

(Patch attached)

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Disable-validation-for-calendar-and-carddav-entries.patch
Type: text/x-diff
Size: 1459 bytes
Desc: not available
URL: </pipermail/calypso/attachments/20140525/d73c5b2e/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: </pipermail/calypso/attachments/20140525/d73c5b2e/attachment.sig>


More information about the Calypso mailing list