encode nodeid parameter in connectTunnel url (#7232)

This commit is contained in:
Jakub Maruszczak 2025-08-14 14:38:56 +02:00 committed by GitHub
parent 28f6f5b7e0
commit 88ccd14438
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2134,7 +2134,7 @@ function serverConnect() {
if ((args.id.split('/') != 3) && (settings.currentDomain != null)) { args.id = 'node/' + settings.currentDomain + '/' + args.id; }
var id = getRandomHex(6);
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' }));
connectTunnel(url.replace('/control.ashx', '/meshrelay.ashx?browser=1&p=' + protocol + '&nodeid=' + args.id + '&id=' + id + '&auth=' + data.cookie));
connectTunnel(url.replace('/control.ashx', '/meshrelay.ashx?browser=1&p=' + protocol + '&nodeid=' + encodeURIComponent(args.id) + '&id=' + id + '&auth=' + data.cookie));
}
break;
}