From 8b1a4365ed9f891c20cfa362b92cc8b1574ee0c8 Mon Sep 17 00:00:00 2001 From: Felipe Hertzer Date: Mon, 3 Mar 2025 13:55:10 +1100 Subject: [PATCH] Fix email validation regex (#5533) ### What problem does this PR solve? This pull request aims to fix a bug that prevents certain email addresses from signing up. The affected TLDs were returning 'invalid email address' errors: .museum .software .photography .technology .marketing .education .international .community .construction .government .consulting .... ### Type of change - [X] Bug Fix (non-breaking change which fixes an issue) --- api/apps/user_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/user_app.py b/api/apps/user_app.py index a78fad5df..1cf85986c 100644 --- a/api/apps/user_app.py +++ b/api/apps/user_app.py @@ -566,7 +566,7 @@ def user_add(): email_address = req["email"] # Validate the email address - if not re.match(r"^[\w\._-]+@([\w_-]+\.)+[\w-]{2,5}$", email_address): + if not re.match(r"^[\w\._-]+@([\w_-]+\.)+[\w-]{2,}$", email_address): return get_json_result( data=False, message=f"Invalid email address: {email_address}!",