1
0
懒得勤快 5 жил өмнө
parent
commit
1d425b1df7

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/ErrorController.cs

@@ -165,7 +165,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         [HttpPost, ValidateAntiForgeryToken, AllowAccessFirewall, ResponseCache(Duration = 115, VaryByQueryKeys = new[] { "email" })]
         public ActionResult GetViewToken(string email)
         {
-            if (string.IsNullOrEmpty(email) || !email.MatchEmail())
+            if (string.IsNullOrEmpty(email) || !email.MatchEmail().isMatch)
             {
                 return ResultData(null, false, "请输入正确的邮箱!");
             }

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/PostController.cs

@@ -327,7 +327,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         [HttpPost, ValidateAntiForgeryToken, AllowAccessFirewall, ResponseCache(Duration = 115, VaryByQueryKeys = new[] { "email" })]
         public ActionResult GetViewToken(string email)
         {
-            if (string.IsNullOrEmpty(email) || !email.MatchEmail())
+            if (string.IsNullOrEmpty(email) || !email.MatchEmail().isMatch)
             {
                 return ResultData(null, false, "请输入正确的邮箱!");
             }

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/ValidateController.cs

@@ -16,7 +16,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         [HttpPost, ValidateAntiForgeryToken, ResponseCache(Duration = 115, VaryByQueryKeys = new[] { "email" })]
         public ActionResult SendCode(string email)
         {
-            if (string.IsNullOrEmpty(email) || !email.MatchEmail())
+            if (string.IsNullOrEmpty(email) || !email.MatchEmail().isMatch)
             {
                 return ResultData(null, false, "请输入正确的邮箱!");
             }

+ 1 - 0
src/Masuit.MyBlogs.Core/appsettings.json

@@ -12,6 +12,7 @@
         "CertPath": "App_Data/cert/server.pfx", // https证书
         "CertPassword": "cEHlnUGu" // 证书密码
     },
+    "EmailDomainWhiteList": "masuit.com,ldqk.org,qq.com,163.com,gmail.com,outlook.com",
     "UseRewriter": "NonWww", //NonWww:重定向到不带www的域名,WWW:重定向到带www的域名
     "ConnString": "Server=127.0.0.1;Port=3306;Database=MyBlogs;Uid=root;Pwd=;Charset=utf8mb4",
     //"ConnString": "Data Source=.;Initial Catalog=MyBlogs;Integrated Security=True",