From 06727cb51179c4f0e327f14fc9f2c48797603bd9 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Thu, 3 Mar 2022 05:15:20 +0000 Subject: [PATCH] fix UiRequest.parsePath --- src/Ui/UiRequest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ui/UiRequest.py b/src/Ui/UiRequest.py index c7f7c922..960da168 100644 --- a/src/Ui/UiRequest.py +++ b/src/Ui/UiRequest.py @@ -630,7 +630,7 @@ class UiRequest(object): if "../" in path or "./" in path: raise SecurityError("Invalid path") - match = re.match(r"/media/(?P
[A-Za-z0-9]+[A-Za-z0-9\._-]+)(?P/.*|$)", path) + match = re.match(r"/(media/)?(?P
[A-Za-z0-9]+[A-Za-z0-9\._-]+)(?P/.*|$)", path) if match: path_parts = match.groupdict() if self.isDomain(path_parts["address"]):