From 38189069ce49b7d974fca5d3694359a921c9f9f1 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 6 Nov 2025 10:10:16 +0100 Subject: [PATCH] node(websocket): Add stricter validation of destination URIs Signed-off-by: Steffen Vogel --- lib/nodes/websocket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/nodes/websocket.cpp b/lib/nodes/websocket.cpp index bdf9cccc5..82a833a51 100644 --- a/lib/nodes/websocket.cpp +++ b/lib/nodes/websocket.cpp @@ -593,6 +593,12 @@ int villas::node::websocket_parse(NodeCompat *n, json_t *json) { "node-config-node-websocket-destinations", "Failed to parse WebSocket URI: '{}'", uri); + if (strlen(path) == 0) { + throw ConfigError(json_dest, "node-config-node-websocket-destinations", + "Missing node name / path in destination URI: '{}'", + d->uri); + } + d->info.ssl_connection = !strcmp(prot, "https"); d->info.address = strdup(ads); d->info.path = strf("/%s", path);