Fix register

This commit is contained in:
Rory&
2025-12-02 19:45:30 +01:00
parent 5075837d55
commit 58b6cabf9c

View File

@@ -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");
}