From d4f470ba719105241d11220e75ec68713ff8676e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannik=20R=C3=B6del?= Date: Sun, 22 Jan 2023 20:24:45 +0100 Subject: [PATCH] Fix hCaptcha falsely not included in final output --- cgi-bin/form.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cgi-bin/form.py b/cgi-bin/form.py index 308e9f0..f0f865f 100755 --- a/cgi-bin/form.py +++ b/cgi-bin/form.py @@ -7,6 +7,7 @@ import collections from collections.abc import Mapping import hmac import mimetypes +import re import os import secrets from typing import Any, Optional, overload @@ -71,7 +72,7 @@ match os.environ.get("REQUEST_METHOD", "").upper(): # place the token *inside* the form. It assumes that there is # a) only one form on the site and # b) the
tag doesn't end on the same line. - if "" in line.lower(): + if re.match(r"", line, re.IGNORECASE) is not None: print(f'') print(f'