mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Fix tests.
This commit is contained in:
1 parent
6294ad9e76
commit
9a6978902d
7 files changed
+36
-23
No files matched your search
@@ -43,8 +43,7 @@ def is_safe_path(file_path, directory):
|
||||
(the file is stored inside directory or one of its sub-directory)
|
||||
"""
|
||||
|
||||
requested_path = os.path.relpath(file_path, start=directory)
|
||||
requested_path = os.path.abspath(requested_path)
|
||||
requested_path = os.path.abspath(file_path)
|
||||
common_prefix = os.path.commonprefix([requested_path, directory])
|
||||
return common_prefix != directory
|
||||
|
||||
|
||||
Reference in new issue
Block a user