Drop isProxy alltogether, because wtf is this language (!![] === true apparently) - Fixes #1444
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;
- }
}
|