aboutsummaryrefslogtreecommitdiffstats
path: root/backend/routes/forms/submit.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-12-18 17:10:20 +0000
committerGravatar GitHub <[email protected]>2020-12-18 17:10:20 +0000
commitd78075ff7803842cac5b3a2ca145d622ad7b1382 (patch)
treed93dfbe628b3d90686d838a6c61a4ed824f00716 /backend/routes/forms/submit.py
parentUpdate submit.py (diff)
parentMerge branch 'main' into ks123/dns-check-remove (diff)
Merge pull request #41 from python-discord/ks123/dns-check-remove
Diffstat (limited to 'backend/routes/forms/submit.py')
-rw-r--r--backend/routes/forms/submit.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/backend/routes/forms/submit.py b/backend/routes/forms/submit.py
index 42fcf79..5bcdeff 100644
--- a/backend/routes/forms/submit.py
+++ b/backend/routes/forms/submit.py
@@ -9,7 +9,6 @@ import uuid
import httpx
from pydantic.main import BaseModel
-import pydnsbl
from pydantic import ValidationError
from spectree import Response
from starlette.requests import Request
@@ -77,9 +76,6 @@ class SubmitForm(Route):
user_agent_hash_ctx.update(request.headers["User-Agent"].encode())
user_agent_hash = binascii.hexlify(user_agent_hash_ctx.digest())
- dsn_checker = pydnsbl.DNSBLIpChecker()
- dsn_blacklist = await dsn_checker.check_async(request.client.host)
-
async with httpx.AsyncClient() as client:
query_params = {
"secret": HCAPTCHA_API_SECRET,
@@ -96,8 +92,7 @@ class SubmitForm(Route):
response["antispam"] = {
"ip_hash": ip_hash.decode(),
"user_agent_hash": user_agent_hash.decode(),
- "captcha_pass": captcha_data["success"],
- "dns_blacklisted": dsn_blacklist.blacklisted,
+ "captcha_pass": captcha_data["success"]
}
if FormFeatures.REQUIRES_LOGIN.value in form.features: