From dd247f36d5ab035c0739a9eba6239feeb19118a6 Mon Sep 17 00:00:00 2001 From: Lars Windolf Date: Sat, 6 Jan 2024 01:15:47 +0100 Subject: [PATCH] Fix host detection. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 9b65c50..9188e54 100644 --- a/server.js +++ b/server.js @@ -73,8 +73,8 @@ function get_hosts(socket) { throw (error); let hosts = stdout.split(/\n/) - .filter(h => h.match(validHostnameRegex) || h.match(validIpAddressRegex)) .map(s => s.replace(/^[0-9]+ +ssh +/, '')) + .filter(h => h.match(validHostnameRegex) || h.match(validIpAddressRegex)) .filter(s => s.length > 1); hosts.push('localhost'); socket.send(JSON.stringify({