1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-31 19:50:55 +00:00

Stricter parsing of filters

This commit is contained in:
Unrud 2017-08-29 20:08:30 +02:00
parent 963e28d661
commit 31ba4eb876
2 changed files with 89 additions and 62 deletions

View file

@ -927,6 +927,11 @@ class Application:
else:
collection = item.collection
headers = {"Content-Type": "text/xml; charset=%s" % self.encoding}
status, xml_answer = xmlutils.report(
base_prefix, path, xml_content, collection)
try:
status, xml_answer = xmlutils.report(
base_prefix, path, xml_content, collection)
except ValueError as e:
self.logger.warning(
"Bad REPORT request on %r: %s", path, e, exc_info=True)
return BAD_REQUEST
return (status, headers, self._write_xml_content(xml_answer))