mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
test: add tests for unvalidated symlink creation in import_project
This commit is contained in:
2 files changed
+76
-28
No files matched your search
@@ -169,7 +169,11 @@ async def import_project(
|
||||
|
||||
def _create_symbolic_links(zip_file, path):
|
||||
"""
|
||||
Materialise symlink entries, refusing any target that escapes `path`.
|
||||
Manually create symbolic links (if any) because ZipFile does not support it.
|
||||
Refuse any target that escapes `path`.
|
||||
|
||||
:param zip_file: ZipFile instance
|
||||
:param path: project location
|
||||
"""
|
||||
|
||||
path_root = os.path.realpath(path) + os.sep
|
||||
|
||||
Reference in new issue
Block a user