From 839694f70f2ac26033646e6f8990b52e1f10fe0c Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Tue, 5 Nov 2024 11:20:14 -0500 Subject: [PATCH] Use abspath for static dirs --- pywb/apps/static_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywb/apps/static_handler.py b/pywb/apps/static_handler.py index dccfa09d..86e6fe39 100644 --- a/pywb/apps/static_handler.py +++ b/pywb/apps/static_handler.py @@ -32,13 +32,13 @@ def __call__(self, environ, url_str): full_path = environ.get('pywb.static_dir') if full_path: - static_path_to_validate = full_path + static_path_to_validate = os.path.abspath(full_path) full_path = os.path.join(full_path, url) if not os.path.isfile(full_path): full_path = None if not full_path: - static_path_to_validate = self.static_path + static_path_to_validate = os.path.abspath(self.static_path) full_path = os.path.join(self.static_path, url) try: