Explorar el Código

Add access check to PROPFIND

Unrud hace 9 años
padre
commit
f294b1cf17
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      radicale/__init__.py

+ 2 - 0
radicale/__init__.py

@@ -509,6 +509,8 @@ class Application:
 
     def do_PROPFIND(self, environ, path, content, user):
         """Manage PROPFIND request."""
+        if not self._access(user, path, "r"):
+            return NOT_ALLOWED
         with self._lock_collection("r", user):
             items = self.Collection.discover(
                 path, environ.get("HTTP_DEPTH", "0"))