summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-02 19:45:30 +0100
committerRory& <root@rory.gay>2025-12-02 19:45:30 +0100
commit58b6cabf9cb3debddcc13580d46fef7abd191d17 (patch)
treeca237e63c00a2e43630677b5aafc480018b3a190 /src/api
parentSupport deleting ACKs for type==channel (diff)
downloadserver-ts-58b6cabf9cb3debddcc13580d46fef7abd191d17.tar.xz
Fix register
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/auth/register.ts2
1 files changed, 1 insertions, 1 deletions
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"); }