From 083bec3d30e62583f622999cf1765c972379adfb Mon Sep 17 00:00:00 2001 From: jusax23 Date: Wed, 8 Mar 2023 17:10:44 +0100 Subject: [PATCH] reverse brutforce check --- src/api/ws.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/ws.ts b/src/api/ws.ts index 3f04630..3d815da 100644 --- a/src/api/ws.ts +++ b/src/api/ws.ts @@ -12,7 +12,7 @@ export const activateWS = () => { activeWS = true; }; export const wsOnConnection = (socket: ws.WebSocket, req: http.IncomingMessage) => { let ip = req.socket.remoteAddress; - if (!activeWS || bruteforcecheck(ip ?? "")) { + if (!activeWS || !bruteforcecheck(ip ?? "")) { debug("WebSocket", "Rejected ip for bruteforce suspicion:", ip); socket.close(); return;