Skip to content

Commit f57cc6b

Browse files
node(websocket): Add stricter validation of destination URIs
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
1 parent e7c6153 commit f57cc6b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/nodes/websocket.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,12 @@ int villas::node::websocket_parse(NodeCompat *n, json_t *json) {
593593
"node-config-node-websocket-destinations",
594594
"Failed to parse WebSocket URI: '{}'", uri);
595595

596+
if (strlen(path) == 0) {
597+
throw ConfigError(json_dest, "node-config-node-websocket-destinations",
598+
"Missing node name / path in destination URI: '{}'",
599+
d->uri);
600+
}
601+
596602
d->info.ssl_connection = !strcmp(prot, "https");
597603
d->info.address = strdup(ads);
598604
d->info.path = strf("/%s", path);

0 commit comments

Comments
 (0)