From be7d172e742a6205ea41cf37892024cf06dd4c8a Mon Sep 17 00:00:00 2001 From: MaxKey Date: Thu, 20 Jun 2024 21:46:42 +0800 Subject: [PATCH] Update ForgotPasswordContorller.java Pattern --- .../maxkey/web/contorller/ForgotPasswordContorller.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ForgotPasswordContorller.java b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ForgotPasswordContorller.java index 530cd97f2..55d4888cd 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ForgotPasswordContorller.java +++ b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ForgotPasswordContorller.java @@ -52,11 +52,9 @@ import org.springframework.web.bind.annotation.ResponseBody; public class ForgotPasswordContorller { private static Logger logger = LoggerFactory.getLogger(ForgotPasswordContorller.class); - Pattern emailRegex = Pattern.compile( - "^\\s*\\w+(?:\\.{0,1}[\\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\\.[a-zA-Z]+\\s*$"); + static final Pattern emailRegex = Pattern.compile("^\\s*\\w+(?:\\.{0,1}[\\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\\.[a-zA-Z]+\\s*$"); - Pattern mobileRegex = Pattern.compile( - "^[1][3,4,5,7,8][0-9]{9}$"); + static final Pattern mobileRegex = Pattern.compile("^[1][3,4,5,6,7,8,9][0-9]{9}$"); @Autowired EmailConfig emailConfig;