diff options
author | 2020-12-21 04:44:12 +0300 | |
---|---|---|
committer | 2020-12-21 04:44:31 +0300 | |
commit | 934be7a6c02d6f4e3741af5e1104a0d9822ea82d (patch) | |
tree | dfa6e6779a451bc9bcf4ac22c3217ade1ccadee6 /backend/routes/forms/submit.py | |
parent | Adds and Documents Webhook Message Variables (diff) | |
parent | Merge pull request #40 from python-discord/ks123/form-patch (diff) |
Merge branch 'main' into discord-webhook
Signed-off-by: Hassan Abouelela <[email protected]>
# Conflicts:
# backend/routes/forms/submit.py
Diffstat (limited to 'backend/routes/forms/submit.py')
-rw-r--r-- | backend/routes/forms/submit.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/backend/routes/forms/submit.py b/backend/routes/forms/submit.py index 5c0cfdd..82caa81 100644 --- a/backend/routes/forms/submit.py +++ b/backend/routes/forms/submit.py @@ -8,7 +8,6 @@ import uuid from typing import Any, Optional import httpx -import pydnsbl from pydantic import ValidationError from pydantic.main import BaseModel from spectree import Response @@ -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: |