From 58b6cabf9cb3debddcc13580d46fef7abd191d17 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 2 Dec 2025 19:45:30 +0100 Subject: [PATCH] Fix register --- src/api/routes/auth/register.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts index 49e565d37..5997b33fa 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts @@ -136,7 +136,7 @@ router.post( } const checkIp = await AbuseIpDbClient.checkIpAddress(ip); - if (checkIp && checkIp.data.abuseConfidenceScore >= register.blockAbuseIpDbAboveScore) { + if (checkIp?.data && checkIp.data.abuseConfidenceScore >= register.blockAbuseIpDbAboveScore) { console.log(`[Register] ${ip} blocked from registration: AbuseIPDB score ${checkIp.data.abuseConfidenceScore} >= ${register.blockAbuseIpDbAboveScore} (CHECK)`); throw new HTTPError("Your IP is blocked from registration"); }