Remove obsolete manual CAPTCHA field handling

This commit is contained in:
Yannik Rödel 2023-01-25 08:29:23 +01:00
parent b135f829f0
commit 559083bb81

View file

@ -147,12 +147,8 @@ if not hmac.compare_digest(csrf_token, given_csrf_token):
# If the honeypot field was not empty, back off. # If the honeypot field was not empty, back off.
if ( if get_form_value(HONEYPOT_FIELD_NAME, ""):
get_form_value(HONEYPOT_FIELD_NAME, "") fail("200 OK", f"Invalid value for field: {HONEYPOT_FIELD_NAME}")
or get_form_value(CAPTCHA_FIELD_NAME,
"").lower().strip() != CAPTCHA_FIELD_VALUE
):
fail("200 OK", f"Invalid value for field: {CAPTCHA_FIELD_NAME}")
if not (hcaptcha_token := get_form_value("h-captcha-response", "")): if not (hcaptcha_token := get_form_value("h-captcha-response", "")):
fail("200 OK", "Empty hCaptcha token") fail("200 OK", "Empty hCaptcha token")