mirror of
https://codeberg.org/angestoepselt/homepage.git
synced 2025-05-24 14:46:16 +00:00
Remove obsolete manual CAPTCHA field handling
This commit is contained in:
parent
b135f829f0
commit
559083bb81
1 changed files with 2 additions and 6 deletions
|
|
@ -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")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue