From 11119e8322611df1c636420633345c442d166691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Farka=C5=A1?= Date: Wed, 22 Jan 2025 18:31:49 +0100 Subject: [PATCH] Normalized IP hotfix --- server/helpers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/helpers.js b/server/helpers.js index 9e7e9cf..4c955dd 100644 --- a/server/helpers.js +++ b/server/helpers.js @@ -164,6 +164,7 @@ function checkIPv6Support(callback) { function antispamProtection(message, clientIp, ws, userCommands, lastWarn, userCommandHistory, lengthCommands, endpointName) { const command = message.toString(); const now = Date.now(); + const normalizedClientIp = clientIp?.replace(/^::ffff:/, ''); if (endpointName === 'text') consoleCmd.logDebug(`Command received from \x1b[90m${clientIp}\x1b[0m: ${command}`); // Initialize user command history if not present