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:
YueGuobin committed 2026-07-16 00:39:51 +08:00
1 parent a495b5ddf2
commit 7e4600b5a1
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, {})