ソースを参照

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)
tags/v0.17.1
Felipe Hertzer 8ヶ月前
コミット
8b1a4365ed
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      api/apps/user_app.py

+ 1
- 1
api/apps/user_app.py ファイルの表示

email_address = req["email"] email_address = req["email"]


# Validate the email address # 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( return get_json_result(
data=False, data=False,
message=f"Invalid email address: {email_address}!", message=f"Invalid email address: {email_address}!",

読み込み中…
キャンセル
保存