summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-18 23:29:04 +0100
committerRory& <root@rory.gay>2025-12-18 23:29:40 +0100
commitb54e86dd4d72592f6e4745c8b8afdfaa0369dac2 (patch)
tree1ccaaefcd3de28ccd89d77f7fba3b74982aac399
parentMerge pull request #1443 from CyberL1/feat/forwards (diff)
downloadserver-ts-b54e86dd4d72592f6e4745c8b8afdfaa0369dac2.tar.xz
Drop isProxy alltogether, because wtf is this language (!![] === true apparently) - Fixes #1444
-rw-r--r--src/api/routes/auth/register.ts5
-rw-r--r--src/util/util/networking/ipdata/IpDataClient.ts9
2 files changed, 0 insertions, 14 deletions
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts

index 6aa52bff..f1487589 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts
@@ -164,11 +164,6 @@ router.post( console.log(`[Register] ${ip} blocked from registration: IPData.co ASN ${ipData.asn.name} is blocked`); throw new HTTPError("Your IP is blocked from registration"); } - - if (register.blockProxies && IpDataClient.isProxy(ipData)) { - console.log(`[Register] ${ip} blocked from registration: IPData.co response matched IpDataClient.isProxy() check`); - throw new HTTPError("Your IP is blocked from registration"); - } } } diff --git a/src/util/util/networking/ipdata/IpDataClient.ts b/src/util/util/networking/ipdata/IpDataClient.ts
index 61778ef6..96b4c076 100644 --- a/src/util/util/networking/ipdata/IpDataClient.ts +++ b/src/util/util/networking/ipdata/IpDataClient.ts
@@ -23,13 +23,4 @@ export class IpDataClient { }); return await resp; } - - //TODO add function that support both ip and domain names - static isProxy(data: IpDataIpLookupResponse) { - if (!data || !data.asn || !data.threat) return false; - if (data.asn.type !== "isp") return true; - if (Object.values(data.threat).some((x) => x)) return true; - - return false; - } }