mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Test current-user-principal prop authentication workaround
This commit is contained in:
parent
6ec63ccc9b
commit
b9bb017edf
2 changed files with 15 additions and 2 deletions
|
@ -56,7 +56,7 @@ def xml_propfind(base_prefix, path, xml_request, allowed_items, user,
|
|||
if xmlutils.make_clark("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.
|
||||
# RFC 5397 doesn't seem to work with DAVx5.
|
||||
return client.FORBIDDEN, None
|
||||
|
||||
# Writing answer
|
||||
|
@ -372,6 +372,6 @@ class ApplicationPropfindMixin:
|
|||
status, xml_answer = xml_propfind(
|
||||
base_prefix, path, xml_content, allowed_items, user,
|
||||
self._encoding)
|
||||
if status == client.FORBIDDEN:
|
||||
if status == client.FORBIDDEN and xml_answer is None:
|
||||
return httputils.NOT_ALLOWED
|
||||
return status, headers, self._write_xml_content(xml_answer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue