Add Cloudflare catch-all mail worker
This commit is contained in:
+10
-1
@@ -493,7 +493,16 @@ def extract_verification_code(text, subject=""):
|
||||
match = re.search(r"^([A-Z0-9]{3}-[A-Z0-9]{3})\s+xAI", subject, re.IGNORECASE)
|
||||
if match:
|
||||
return match.group(1)
|
||||
match = re.search(r"\b([A-Z0-9]{3}-[A-Z0-9]{3})\b", text, re.IGNORECASE)
|
||||
for source in (subject, text):
|
||||
match = re.search(
|
||||
r"(?:confirmation|verification)\s+code\s*[::]\s*([A-Z0-9]{3}-[A-Z0-9]{3})",
|
||||
source,
|
||||
re.IGNORECASE,
|
||||
)
|
||||
if match:
|
||||
return match.group(1)
|
||||
# Keep this case-sensitive: lower-case CSS tokens such as `per-100` are not codes.
|
||||
match = re.search(r"\b([A-Z0-9]{3}-[A-Z0-9]{3})\b", text)
|
||||
if match:
|
||||
return match.group(1)
|
||||
patterns = [
|
||||
|
||||
Reference in New Issue
Block a user