Require user for current-user-principal

DAVdroid dropped support for preemptive authentication in version 1.2.3.
Returning the DAV:unauthenticated pseudo-principal as specified in RFC 5397 doesn't seem to work for DAVdroid.
This commit is contained in:
Unrud 2016-08-12 23:41:34 +02:00
parent 6515062bcd
commit 4438d2ba9a

View File

@ -510,6 +510,12 @@ def propfind(path, xml_request, read_collections, write_collections, user):
_tag("ICAL", "calendar-color"),
_tag("CS", "getctag")]
if _tag("D", "current-user-principal") in props and not user:
# Ask for authentication
# Returning the DAV:unauthenticated pseudo-principal as specified in
# RFC 5397 doesn't seem to work with DAVdroid.
return client.FORBIDDEN, None
multistatus = ET.Element(_tag("D", "multistatus"))
collections = []
for collection in write_collections: