YueGuobin
702fc1f6d9
fix: never allow the projects directory to become a project directory
...
Loading a .gns3 placed directly in the projects root registered the
shared projects directory as the project path (load_project derives
the path from the file's parent directory). Deleting such an entry ran
rmtree on the projects directory itself, wiping every project until a
root-owned file stopped it, and left a zombie entry in the controller.
Three layers of protection:
- Controller.load_project() refuses a .gns3 whose parent directory is
the projects directory; the normal subdirectory layout is unaffected
- the Project.path setter rejects the projects directory itself and
its ancestors, closing the same hole for POST/PUT with an explicit
path
- Project.delete() uses realpath + commonpath instead of commonprefix:
entries whose path is the projects root are refused, and sibling
directories sharing a string prefix (/srv/projects-evil vs
/srv/projects) are no longer treated as inside the projects dir
Also removes the project_load MCP tool: loading by raw server
filesystem path is a footgun for automated clients; projects can still
be opened by project_id via the remaining tools.
2026-08-25 13:17:37 +08:00
grossmj
544d15c87e
fix: tests after merging
2026-08-08 16:50:19 +02:00
grossmj
dff79f65d3
Merge branch '2.2' into 3.1
...
# Conflicts:
# gns3server/compute/qemu/qemu_vm.py
# gns3server/controller/import_project.py
# gns3server/controller/project.py
# gns3server/crash_report.py
# gns3server/version.py
# tests/compute/docker/test_docker_vm.py
# tests/controller/test_import_project.py
# tests/controller/test_project.py
2026-08-08 16:27:14 +02:00
grossmj
b797981a65
test: add tests for unvalidated symlink creation in import_project
2026-07-29 18:48:31 +02:00
grossmj
47a7324eb5
Fix tests
2026-02-25 19:00:57 +08:00
grossmj
8c7c17b889
Upgrade dependencies and fix Pydantic warnings
2024-10-31 17:09:52 +10:00
grossmj
c4fcb43e78
Merge branch '2.2' into 3.0
...
# Conflicts:
# .github/workflows/testing.yml
# CHANGELOG
# README.md
# dev-requirements.txt
# gns3server/compute/docker/docker_vm.py
# gns3server/controller/export_project.py
# gns3server/controller/import_project.py
# gns3server/controller/project.py
# gns3server/crash_report.py
# gns3server/static/web-ui/index.html
# gns3server/static/web-ui/main.df8c319a3da6fb0e3629.js
# gns3server/version.py
# requirements.txt
# setup.py
# tests/compute/docker/test_docker_vm.py
# tests/controller/test_import_project.py
2024-10-31 12:54:35 +10:00
grossmj
24bfc205db
Symbolic links support for project export/import
2024-10-19 15:49:23 +10:00
grossmj
6ed18c561f
Merge branch '2.2' into 3.0
...
# Conflicts:
# gns3server/compute/qemu/qemu_vm.py
# gns3server/config_samples/gns3_server.conf
# gns3server/controller/export_project.py
# gns3server/controller/project.py
# gns3server/controller/snapshot.py
# gns3server/handlers/api/controller/project_handler.py
# tests/controller/test_export_project.py
# tests/controller/test_import_project.py
# tests/controller/test_snapshot.py
2024-07-07 19:04:50 +02:00
grossmj
d54c9db8c3
Option to keep the compute IDs unchanged when exporting a project
2024-07-06 17:08:16 +02:00
grossmj
46a9fdb61d
Remove event_loop
2024-05-09 17:53:02 +07:00
grossmj
33499be425
Fix warnings in tests
2024-05-09 17:11:12 +07:00
grossmj
900d4f79ee
"Local" command line parameter is only for stopping
...
a server that has been started by the desktop GUI
2022-03-30 18:38:34 +08:00
grossmj
d556c08def
Revert "Skip test"
...
This reverts commit 8acb2fe3
2021-06-08 12:27:20 +09:30
grossmj
8acb2fe37e
Skip test
2021-06-08 12:18:27 +09:30
grossmj
30ebae207f
Use Pydantic to validate the server config file.
2021-04-12 17:02:23 +09:30
grossmj
eb3cb8a41f
Migration to FastAPI
2020-10-02 16:07:50 +09:30
grossmj
e4b7e46444
Fix tests for Windows
2020-06-16 01:57:16 -07:00
grossmj
d3ea67da24
Refactor tests
...
* Use pytest-aiohttp
* Use the async def / await syntax.
* Fix tests to run with Python 3.8
2020-06-16 13:59:03 +09:30
ziajka
e5a7eb74ed
Fix project tests
2017-09-05 10:38:17 +02:00
Julien Duponchelle
5a86277a9f
Test that import erase the auto_open and auto_start setting
...
Ref #1041
2017-05-23 16:08:30 +02:00
Julien Duponchelle
851d6e1db8
When importing portable project NAT node is loaded on GNS3 VM
...
Fix #1030
2017-05-15 10:21:37 +02:00
Julien Duponchelle
18835974fb
Fix required field in schema not use
...
Fix #972
2017-04-11 10:57:01 +02:00
Julien Duponchelle
846041a59c
Fix configuration lost during save as on remote server
...
Fix https://github.com/GNS3/gns3-gui/issues/1704 , https://github.com/GNS3/gns3-gui/issues/1705
2016-12-08 16:55:16 +01:00
Julien Duponchelle
e01931269f
Fix import project tests
2016-09-27 18:44:32 +02:00
Julien Duponchelle
f0af7d3c7a
Change node_id when I save as
...
Fix https://github.com/GNS3/gns3-gui/issues/1519
2016-09-19 16:36:19 +02:00
Julien Duponchelle
68eca6c111
Replace snapshots by import / export
...
Fix #1042
2016-07-26 19:52:58 +02:00
Julien Duponchelle
e50acf811c
If we don't have a GNS3 VM on linux don't move file to it
2016-07-25 18:03:22 +02:00
Julien Duponchelle
f357879186
API for duplicate a project
...
Ref https://github.com/GNS3/gns3-gui/issues/995
2016-07-25 16:26:33 +02:00
Julien Duponchelle
fb3b6b62f5
Support a name and path during the import
...
Not exposed to the client for the moment.
2016-07-25 09:41:41 +02:00
Julien Duponchelle
fec3694710
Import project on the GNS3VM should work
2016-07-22 16:05:22 +02:00
Julien Duponchelle
19b035d7e4
Update documentation
2016-07-22 13:54:57 +02:00
Julien Duponchelle
ce557ecd23
Change the compute id to the GNS3 VM if it's not a Linux host
2016-07-22 13:50:15 +02:00
Julien Duponchelle
e6831c25e2
Fix tests
2016-07-22 13:24:44 +02:00
Julien Duponchelle
94a262cd46
When importing a project fix the GNS3 version
2016-07-22 11:52:59 +02:00
Julien Duponchelle
487e99bea5
Import with images
2016-07-21 17:55:37 +02:00
Julien Duponchelle
b5ab53bbe9
Early import project api
2016-07-21 14:48:13 +02:00