Blob Blame History Raw
From bab31e085f355dd73858fd3715f7ed71849656da Mon Sep 17 00:00:00 2001
From: ziirish <ziirish@ziirish.info>
Date: Wed, 1 Sep 2021 21:53:02 +0200
Subject: [PATCH] optimize email regex (credits: @kevinbackhouse, fix: #372)

---
 flask_restx/inputs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flask_restx/inputs.py b/flask_restx/inputs.py
index b05532f..9c76d8a 100644
--- a/flask_restx/inputs.py
+++ b/flask_restx/inputs.py
@@ -48,7 +48,7 @@ netloc_regex = re.compile(
 
 
 email_regex = re.compile(
-    r"^" "(?P<local>[^@]*[^@.])" r"@" r"(?P<server>[^@]+(?:\.[^@]+)*)" r"$",
+    r"^" "(?P<local>[^@]*[^@.])" r"@" r"(?P<server>[^@\.]+(?:\.[^@\.]+)*)" r"$",
     re.IGNORECASE,
 )
 
-- 
2.31.1