From 62ee3ae8cf0701546a8c32cd06195c1d6303d5f2 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Tue, 5 Apr 2022 20:11:31 -0700 Subject: [PATCH] Replace Path.absolute with os.path.abspath --- src/django_idom/http/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/django_idom/http/views.py b/src/django_idom/http/views.py index 552d7418..4134c058 100644 --- a/src/django_idom/http/views.py +++ b/src/django_idom/http/views.py @@ -12,7 +12,7 @@ async def web_modules_file(request: HttpRequest, file: str) -> HttpResponse: """Gets JavaScript required for IDOM modules at runtime. These modules are returned from cache if available.""" web_modules_dir = IDOM_WED_MODULES_DIR.current - path = web_modules_dir.joinpath(*file.split("/")).absolute() + path = os.path.abspath(web_modules_dir.joinpath(*file.split("/"))) # Prevent attempts to walk outside of the web modules dir if str(web_modules_dir) != os.path.commonpath((path, web_modules_dir)):