mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-04 11:24:00 +08:00
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)
This commit is contained in:
parent
8a2542157f
commit
8b1a4365ed
@ -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}!",
|
||||
|
Loading…
x
Reference in New Issue
Block a user