|
|
@@ -17,6 +17,7 @@ using Masuit.MyBlogs.Core.Models.ViewModel;
|
|
|
using Masuit.Tools;
|
|
|
using Masuit.Tools.Core.Net;
|
|
|
using Masuit.Tools.Html;
|
|
|
+using Masuit.Tools.Logging;
|
|
|
using Masuit.Tools.Security;
|
|
|
using Masuit.Tools.Strings;
|
|
|
using Masuit.Tools.Systems;
|
|
|
@@ -216,8 +217,10 @@ namespace Masuit.MyBlogs.Core.Controllers
|
|
|
return ResultData(null, false, "验证码错误!");
|
|
|
}
|
|
|
|
|
|
- if (Regex.Match(post.Title + post.Author + post.Content, CommonHelper.BanRegex).Length > 0)
|
|
|
+ var match = Regex.Match(post.Title + post.Author + post.Content, CommonHelper.BanRegex);
|
|
|
+ if (match.Success)
|
|
|
{
|
|
|
+ LogManager.Info($"提交内容:{post.Title}/{post.Author}/{post.Content},敏感词:{match.Value}");
|
|
|
return ResultData(null, false, "您提交的内容包含敏感词,被禁止发表,请检查您的内容后尝试重新提交!");
|
|
|
}
|
|
|
|
|
|
@@ -410,6 +413,7 @@ namespace Masuit.MyBlogs.Core.Controllers
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
+
|
|
|
#region 直接合并
|
|
|
|
|
|
if (post.Email.Equals(dto.ModifierEmail))
|