diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs index c7387a7aec..c2ebcc441b 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs @@ -40,7 +40,7 @@ namespace Volo.Blogging.Pages.Blog.Posts { return Redirect("/"); } - if (BlogNameControlHelper.IsFileFormat(BlogShortName)) + if (BlogNameControlHelper.IsProhibitedFileFormatName(BlogShortName)) { return NotFound(); } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs index df7c23fc97..77a54ffa11 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs @@ -38,7 +38,7 @@ namespace Volo.Blogging.Pages.Blog.Posts public virtual async Task OnGetAsync() { - if (BlogNameControlHelper.IsFileFormat(BlogShortName)) + if (BlogNameControlHelper.IsProhibitedFileFormatName(BlogShortName)) { return NotFound(); } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Helpers/BlogNameControlHelper.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Helpers/BlogNameControlHelper.cs index 7bfcf9ad49..41ffa74683 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Helpers/BlogNameControlHelper.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Helpers/BlogNameControlHelper.cs @@ -7,7 +7,7 @@ namespace Volo.Blogging.Pages.Blogs.Shared.Helpers { public static readonly string[] ProhibitedFileExtensions = new string[] {".ico", ".txt", ".php"}; - public static bool IsFileFormat(string blogShortName) + public static bool IsProhibitedFileFormatName(string blogShortName) { if (!string.IsNullOrWhiteSpace(blogShortName)) {