summaryrefslogtreecommitdiff
path: root/tools/scan-view
diff options
context:
space:
mode:
Diffstat (limited to 'tools/scan-view')
-rw-r--r--tools/scan-view/ScanView.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/scan-view/ScanView.py b/tools/scan-view/ScanView.py
index 3e03f1a6a3..32570b9858 100644
--- a/tools/scan-view/ScanView.py
+++ b/tools/scan-view/ScanView.py
@@ -708,8 +708,8 @@ File Bug</h3>
def send_path(self, path):
# If the requested path is outside the root directory, do not open it
- rel = os.path.relpath(path, self.server.root)
- if rel.startswith(os.pardir + os.sep):
+ rel = os.path.abspath(os.path.join(self.server.root, path))
+ if not rel.startswith(os.path.abspath(self.server.root) ):
return self.send_404()
ctype = self.guess_type(path)