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
Jeremy Grossmann
725cd0428c
Apply suggestion from @Copilot
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-07 17:35:33 +08:00
Cristi
104f56cb55
Enhancement: Refresh projects list without restarting the GNS3 server
2026-04-07 00:21:56 +03:00
grossmj
4758431c76
Improvements for built-in disks
...
* Checksum is updated in the database for updated disks.
* It is not possible to prune them.
2025-01-02 23:10:51 +07:00
grossmj
9c456532d0
Pydantic v2 migration
2023-08-04 18:20:06 +10:00
grossmj
b3dfb87622
Merge branch '2.2' into 3.0
...
# Conflicts:
# gns3server/controller/__init__.py
# gns3server/crash_report.py
# gns3server/static/web-ui/index.html
# gns3server/static/web-ui/main.96be36058f5df0ca7e7f.js
# gns3server/utils/images.py
# gns3server/version.py
# requirements.txt
# tests/compute/docker/test_docker_vm.py
# tests/controller/test_controller.py
2023-05-22 15:11:17 +08:00
grossmj
f3f7921525
Add generic function to install resource files
2023-05-07 21:57:44 +08:00
grossmj
72e3d8f0c1
Fix tests after merge
2023-01-05 12:57:00 +08:00
grossmj
27d9063e56
Merge 2.2
2023-01-05 12:38:00 +08:00
grossmj
5bccf4841d
Overwrite built-in appliance files when starting a more recent version of the server
2023-01-01 15:57:41 +08:00
grossmj
93449c942f
Fix tests
2022-12-22 09:24:17 +08:00
grossmj
263febecbc
Merge branch '2.2' into 3.0
...
# Conflicts:
# .github/workflows/testing.yml
# CHANGELOG
# appveyor.yml
# dev-requirements.txt
# gns3server/compute/base_node.py
# gns3server/controller/__init__.py
# gns3server/controller/appliance_manager.py
# gns3server/crash_report.py
# gns3server/static/web-ui/index.html
# gns3server/utils/get_resource.py
# gns3server/version.py
# gns3server/web/route.py
# requirements.txt
# tests/handlers/api/compute/test_qemu.py
# win-requirements.txt
2022-11-09 20:30:28 +08:00
grossmj
2e550d839e
Fix tests
2022-11-07 20:33:02 +08:00
grossmj
67bf14776f
Config option to disable built-in templates
2022-06-15 14:48:52 +02:00
grossmj
10fdd8fcf4
Add connect endpoint for computes
...
Param to connect to compute after creation
Report compute unauthorized HTTP errors to client
2021-12-24 13:05:39 +10:30
grossmj
88d98cf02e
Fix tests and workaround issue with flake8
2021-10-18 22:12:10 +10:30
grossmj
cefab8d362
Rename __json__() to asdict()
2021-04-17 23:34:28 +09:30
grossmj
30ebae207f
Use Pydantic to validate the server config file.
2021-04-12 17:02:23 +09:30
grossmj
5217dbf3a3
Fix tests
2021-04-05 14:39:50 +09:30
grossmj
d730c591b3
Refactor template management to use database.
2021-03-28 11:15:08 +10:30
grossmj
13da8aa8f5
Do not automatically connect to local compute.
2020-10-22 16:47:11 +10:30
grossmj
eb3cb8a41f
Migration to FastAPI
2020-10-02 16:07:50 +09:30
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
grossmj
6c322bbdde
Fix tests.
2020-04-30 15:49:06 +09:30
grossmj
06ce0868ec
Fix template migration issues from GUI to controller. Fixes https://github.com/GNS3/gns3-gui/issues/2803
2019-06-15 12:52:50 +02:00
grossmj
8360ae98b1
Move appliance and template management code in their own classes.
2019-01-14 16:09:06 +07:00
grossmj
d7c2e16c21
Use "template" to name what we use to create new nodes.
2018-11-28 16:12:58 +07:00
grossmj
98f04365b7
Remove generic controller settings API endpoint.
2018-11-14 16:24:30 +08:00
grossmj
cebb56387a
Fix tests.
2018-11-13 15:40:18 +08:00
grossmj
651d8280a7
Fix appliance template tests.
2018-08-19 19:35:45 +07:00
grossmj
7f72b90b0e
The server has now 2 notification streams
...
* A new one for controller related events (compute, appliance templates etc.)
* The existing one for project related events (links, nodes etc.)
2018-08-16 21:31:57 +07:00
grossmj
658aa4bae9
Merge 2.1 into 2.2 branch
2018-03-12 13:38:50 +07:00
grossmj
e3b3427cc6
Fix GNS3 VM start test.
2017-12-05 20:30:28 -06:00
grossmj
dde2003168
Fix tests.
2017-12-05 16:56:50 -06:00
grossmj
745532bf23
Fix auto idlepc test.
2017-11-23 23:46:22 +07:00
Julien Duponchelle
6996b7094f
Handle invalid appliances files
...
Fix #1150
2017-07-28 15:21:35 +02:00
Julien Duponchelle
7d123f334f
Add an appliance templates directory
...
Fix https://github.com/GNS3/gns3-gui/issues/2133
2017-07-19 11:44:05 +02:00
Julien Duponchelle
3eadbb9adb
Implement an api call for computing the IDLE PC
...
Fix https://github.com/GNS3/gns3-gui/pull/2153
2017-07-07 17:50:40 +02:00
Julien Duponchelle
617868402f
Fix the initial startup for VPCS is not used
...
The default VPCS template didn't provide the base
startup config setting. This prevent the replacement
of the hostname in the configuration file.
Fix https://github.com/GNS3/gns3-gui/issues/2123
2017-06-27 18:44:31 +02:00
Julien Duponchelle
bb8097a052
Merge remote-tracking branch 'origin/master' into 2.1
2017-06-19 10:44:52 +02:00
Julien Duponchelle
c8c991af78
Fix the error about appliance ID not found ( #1075 )
...
* Fix the error about appliance ID not found
* Copy appliance data before editing it
2017-06-19 08:47:50 +02:00
ziajka
e0b519eced
Fix when config file doesn't have computes section ( #1062 )
2017-06-07 10:50:40 +02:00
Julien Duponchelle
9dc6f0f486
Embed the appliances in the server. ( #927 )
...
This add a /appliances call
2017-04-12 14:35:49 +02:00
Julien Duponchelle
4f1b738ef5
Merge branch '2.0' into 2.1
2017-03-30 10:16:16 +02:00
Julien Duponchelle
cc6f4c0510
Add a modification uuid to settings returned by the server
...
Ref #1949
2017-03-21 13:35:02 +01:00
Julien Duponchelle
99ee40df3d
Do not return broken appliances like ASA 8
2017-03-09 15:44:48 +01:00
Julien Duponchelle
5036079deb
Merge branch '2.0' into 2.1
2017-03-07 16:48:31 +01:00
Julien Duponchelle
7b642552dd
Fix GNS3VM settings are lost at startup
...
Fix #926
2017-03-07 15:36:35 +01:00
Julien Duponchelle
5a399b90fe
Merge branch '2.1' into embed_appliances
2017-02-28 14:55:33 +01:00
Julien Duponchelle
1ab9ca2333
Merge branch '2.0' into 2.1
2017-02-28 14:25:38 +01:00