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
bc8e43dfca
fix: add event handling for deleted projects
2026-08-08 17:27:52 +02:00
YueGuobin
179f072c33
fix(marker): fix inheritance hook, topology load, update sync, and asdict
...
Bugs found via end-to-end testing of project-level marker definitions:
1. New links didn't inherit — apply_defs_to_new_link is async but was
called without await in UDPLink.create().
2. Project load crashed — load_project passed marker_definitions to
Project.__init__. Now popped in load_project and restored separately
in Project.open() (it backs a read-only property).
3. PUT on a definition didn't sync to links — update_marker's guard
rejected even the project-layer sync call. Added an `inherited`
bypass flag used by update_marker_definition.
4. _ubridge_add_marker_filter raised re.PatternError — the name regex
used (?i)(?!global) look-around, invalid in Python's re module.
Dropped the prefix check there: "global-*" names are legitimate at
the uBridge boundary (inherited definitions); forbidden only at the
user-facing schema.
5. GET /links hid inherited markers — asdict()'s runtime branch used
_persist_markers() (which filters inherited markers). Restored
self._markers for the runtime branch; only the topology_dump branch
filters (inherited markers are rebuilt from definitions on load).
6. Duplicate "already exists" warnings on project open — open() fanned
out definitions to all links, but UDPLink.create() had already done
so via its inheritance hook. Removed the redundant fan-out in open().
2026-07-16 00:39:52 +08:00
grossmj
85bbc74f7d
Fix using SSL with remote computes. Fixes https://github.com/GNS3/gns3-gui/issues/3733
2026-04-23 21:59:51 +08:00
grossmj
0d3fad8c8f
Merge branch '2.2' into 3.0
...
# Conflicts:
# gns3server/controller/__init__.py
# gns3server/controller/export_project.py
# gns3server/controller/project.py
# gns3server/controller/snapshot.py
# gns3server/crash_report.py
# gns3server/schemas/snapshot.py
# gns3server/static/web-ui/26.34a83d9cee7db39cd0de.js
# gns3server/static/web-ui/index.html
# gns3server/static/web-ui/main.d74d38241f0602d1b3e0.js
# gns3server/version.py
# gns3server/web/route.py
# tests/handlers/api/controller/test_project.py
# tests/handlers/api/controller/test_snapshot.py
2026-04-11 19:22:05 +08:00
grossmj
6f7730c455
Update snapshots when duplicating a project
2026-04-09 23:18:55 +08:00
grossmj
5b04fd0336
Allow to find new project in sub dirs
2026-04-07 18:05:32 +08:00
Jeremy Grossmann
de8abc0af0
Apply suggestions from code review
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-07 17:37:34 +08:00
Cristi
104f56cb55
Enhancement: Refresh projects list without restarting the GNS3 server
2026-04-07 00:21:56 +03:00
grossmj
0a118dc9e7
Cancel tasks if controller cannot be started
2026-02-16 19:16:06 +08:00
grossmj
2516b1952c
Install custom symbols. Fixes #2492
2025-01-29 18:32:04 +10: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
249bf89b7e
Allow for upgrading built-in disks
2024-12-26 23:04:47 +07:00
grossmj
648ae231ef
Fix project auto open feature. Fixes #2455
2024-12-18 18:40:31 +07:00
grossmj
014d3f2ad9
Store IOU licence in the secrets directory and disable the check by default
2024-12-17 16:12:17 +07:00
grossmj
bd813b0a53
Merge branch '2.2' into 3.0
...
# Conflicts:
# requirements.txt
# setup.py
2024-11-18 11:46:42 +10:00
grossmj
a60e0d424d
Overwrite user resources when the originals have changed.
...
Excepting configs and disks which can be customized.
2024-11-09 12:17:06 +10:00
grossmj
74d07173c1
Upgrade aiohttp to v3.10.10. Fixes #2411
2024-10-31 13:48:22 +10:00
grossmj
3f7f5a3cda
Fix to access resources_path and install_builtin_appliances settings
2024-07-09 12:28:39 +02:00
grossmj
59ad5c55ec
Merge branch '2.2' into 3.0
...
# Conflicts:
# CHANGELOG
# gns3server/config_samples/gns3_server.conf
# gns3server/controller/__init__.py
# gns3server/crash_report.py
# gns3server/static/web-ui/index.html
# gns3server/static/web-ui/main.b65e52314df938ebe652.js
# gns3server/version.py
2024-07-09 12:14:44 +02:00
grossmj
ca1d99b112
Add 'install_builtin_appliances' and 'resources_path' settings in the server config
2024-07-08 18:06:33 +02:00
grossmj
e9827653ae
Merge branch '2.2' into 3.0
...
# Conflicts:
# gns3server/crash_report.py
# gns3server/static/web-ui/index.html
# gns3server/version.py
# tests/compute/docker/test_docker_vm.py
2024-03-05 01:05:46 +08:00
grossmj
84db3b9996
Fix not all Docker resources are copied to a writable location
2024-02-22 12:59:44 +08:00
grossmj
1a53c9aabf
Backport from v3: install Docker resources in a writable location at runtime.
2024-02-14 16:13:45 +08:00
grossmj
09ff807055
Install Docker resources in writable location
2023-11-13 11:23:26 +10:00
grossmj
6ca15cbcff
Merge branch '2.2' into 3.0
...
# Conflicts:
# .github/workflows/testing.yml
# requirements.txt
# setup.py
2023-10-18 14:49:49 +10:00
grossmj
999a47f747
Fix issue with importlib.resources.files() and Python 3.9
2023-09-23 20:44:00 +10:00
grossmj
c11b3c3911
Fix tests after merge
2023-09-06 23:42:50 +07:00
grossmj
1ec056c1a6
Merge branch '2.2' into 3.0
...
# Conflicts:
# gns3server/compute/docker/docker_vm.py
# gns3server/controller/__init__.py
# gns3server/controller/appliance_manager.py
# gns3server/web/route.py
# requirements.txt
# tests/compute/docker/test_docker_vm.py
2023-09-06 23:30:00 +07:00
grossmj
709aa46074
Fix issue with controller config saved before checking current version with previous one
2023-09-06 16:48:24 +07:00
grossmj
0c12849d0d
Use controller vars file to store version and appliance etag
2023-09-06 16:28:46 +07:00
grossmj
df2f96828e
Use the user data dir to store built-in appliances
2023-08-12 18:48:43 +10:00
grossmj
962c5eed8e
Add log message for comparing controller version with config version. Ref https://github.com/GNS3/gns3-gui/issues/3486
2023-08-05 20:24:11 +10:00
grossmj
1d59afa9fb
Merge branch '2.2' into 3.0
...
# Conflicts:
# gns3server/controller/__init__.py
# gns3server/crash_report.py
# gns3server/handlers/api/controller/node_handler.py
# gns3server/utils/images.py
2023-08-02 18:26:50 +10:00
grossmj
c51d71a4fa
Fix version check when installing appliances. Ref https://github.com/GNS3/gns3-gui/issues/3486
2023-08-02 17:58:53 +10:00
grossmj
21049d73a5
Allow computes to be dynamically or manually allocated
2023-06-21 22:28:09 +09:30
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
161f62d083
Install empty Qemu disks on first start
2023-05-05 22:40:58 +08:00
grossmj
3c2ae5363c
Install built-in appliances when no previous version has been detected. Fixes #2168
2023-01-17 13:39:01 +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
d2ad9dc5e2
Delete the built-in appliance directory before installing updated files
2023-01-01 17:49: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
5bcc247881
Make gns3server.appliances a package
2022-12-30 11:37:34 +08:00
grossmj
b8d595928b
Try to fix tests
2022-12-30 10:35:29 +08:00
grossmj
3804249d89
Fix tests
2022-12-30 10:01:43 +08:00
grossmj
c56a8ef8f7
Only use importlib_resources for Python < 3.9. Fixes #2147
2022-12-30 09:15:40 +08:00
grossmj
3e29ae4276
Add config option to change the server name. Ref #2149
2022-12-27 10:05:13 +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