From cb81658318c072981c5ddbb0db69df88ec746c82 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 17 Mar 2024 15:13:07 +0100 Subject: [PATCH] Add "localhost" entry to the block list, when "block localhost" is typed into SVR.JS rather than "::ffff:localhost". --- svr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svr.js b/svr.js index a1de4d8..1f41a63 100644 --- a/svr.js +++ b/svr.js @@ -5241,7 +5241,7 @@ function start(init) { else if (!cluster.isPrimary) process.send("Cannot block non-existent IP."); } else { for (var i = 0; i < ip.length; i++) { - if (ip[i].indexOf(":") == -1) { + if (ip[i] != "localhost" && ip[i].indexOf(":") == -1) { ip[i] = "::ffff:" + ip[i]; } if (!blocklist.check(ip[i])) {