Unrud пре 8 година
родитељ
комит
2178ba58be
2 измењених фајлова са 5 додато и 2 уклоњено
  1. 2 1
      radicale/storage.py
  2. 3 1
      radicale/web.py

+ 2 - 1
radicale/storage.py

@@ -484,7 +484,8 @@ class Collection(BaseCollection):
             filesystem_path = path_to_filesystem(folder, sane_path)
         except ValueError as e:
             # Path is unsafe
-            cls.logger.info(e)
+            cls.logger.debug("Collection with unsafe path %r requested: %s",
+                             sane_path, e, exc_info=True)
             return
 
         # Check if the path exists and if it leads to a collection or an item

+ 3 - 1
radicale/web.py

@@ -84,7 +84,9 @@ class Web(BaseWeb):
         try:
             filesystem_path = storage.path_to_filesystem(
                 self.folder, path[len("/.web"):])
-        except ValueError:
+        except ValueError as e:
+            self.logger.debug("Web content with unsafe path %r requested: %s",
+                              path, e, exc_info=True)
             return NOT_FOUND
         if os.path.isdir(filesystem_path) and not path.endswith("/"):
             location = posixpath.basename(path) + "/"