encode nodeid parameter in connectTunnel url (#7232)

Jakub Maruszczak committed Aug 14, 2025 at 14:38 UTC 88ccd1443823cdeaec66b0f04f76228996460b8b
1 file changed +1 -1
meshctrl.js
+1 -1
@@ -2134,7 +2134,7 @@ function serverConnect() {
2134 if ((args.id.split('/') != 3) && (settings.currentDomain != null)) { args.id = 'node/' + settings.currentDomain + '/' + args.id; }
2135 var id = getRandomHex(6);
2136 ws.send(JSON.stringify({ action: 'msg', nodeid: args.id, type: 'tunnel', usage: 1, value: '*/meshrelay.ashx?p=' + protocol + '&nodeid=' + args.id + '&id=' + id + '&rauth=' + data.rcookie, responseid: 'meshctrl' }));
2137 - connectTunnel(url.replace('/control.ashx', '/meshrelay.ashx?browser=1&p=' + protocol + '&nodeid=' + args.id + '&id=' + id + '&auth=' + data.cookie));
2137 + connectTunnel(url.replace('/control.ashx', '/meshrelay.ashx?browser=1&p=' + protocol + '&nodeid=' + encodeURIComponent(args.id) + '&id=' + id + '&auth=' + data.cookie));
2138 }
2139 break;
2140 }