mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-31 02:55:39 +00:00
Fix register
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user