mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
fix(marker): validate marker name and expose enabled via REST
Add a name pattern constraint to MarkerCreate schema (alphanumeric + _.-) to prevent injection into uBridge commands, with a matching defense-in-depth check in _ubridge_add_marker_filter for hand-edited topology files. Also add the missing "enabled" field to MarkerCreate and pass it through the PUT route so the documented toggle actually works.
This commit is contained in:
3 files changed
+17
-2
No files matched your search
@@ -506,6 +506,7 @@ async def update_marker(
|
||||
bpf=marker_data.bpf if marker_data.bpf else None,
|
||||
tag=marker_data.tag,
|
||||
color=marker_data.color,
|
||||
enabled=marker_data.enabled,
|
||||
)
|
||||
return link.markers.get(marker_name, {})
|
||||
|
||||
|
||||
Reference in new issue
Block a user