mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-28 19:40:54 +00:00
assert sanitized and stripped paths
This commit is contained in:
parent
c08754cf92
commit
5429f5c1a9
19 changed files with 108 additions and 72 deletions
|
@ -28,7 +28,7 @@ import posixpath
|
|||
from http import client
|
||||
from urllib.parse import quote
|
||||
|
||||
from radicale import httputils, storage, xmlutils
|
||||
from radicale import httputils, pathutils, storage, xmlutils
|
||||
from radicale.log import logger
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ class ApplicationGetMixin:
|
|||
def do_GET(self, environ, base_prefix, path, user):
|
||||
"""Manage GET request."""
|
||||
# Redirect to .web if the root URL is requested
|
||||
if not path.strip("/"):
|
||||
if not pathutils.strip_path(path):
|
||||
web_path = ".web"
|
||||
if not environ.get("PATH_INFO"):
|
||||
web_path = posixpath.join(posixpath.basename(base_prefix),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue