Skip to content

Commit

Permalink
Make MvcServicePath regex matching ignore case.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimarobert committed May 9, 2024
1 parent 8e0093b commit d975eaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DNN Platform/DotNetNuke.Web.Mvc/MvcHttpModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace DotNetNuke.Web.Mvc

public class MvcHttpModule : IHttpModule
{
public static readonly Regex MvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled);
public static readonly Regex MvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled | RegexOptions.IgnoreCase);

static MvcHttpModule()
{
Expand All @@ -47,7 +47,7 @@ public void Dispose()
private static void InitDnn(object sender, EventArgs e)
{
var app = sender as HttpApplication;
if (app != null && MvcServicePath.IsMatch(app.Context.Request.RawUrl.ToLowerInvariant()))
if (app != null && MvcServicePath.IsMatch(app.Context.Request.RawUrl))
{
Initialize.Init(app);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace DotNetNuke.HttpModules
public class MobileRedirectModule : IHttpModule
{
private readonly IList<string> specialPages = new List<string> { "/login.aspx", "/register.aspx", "/terms.aspx", "/privacy.aspx", "/login", "/register", "/terms", "/privacy" };
private readonly Regex mvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled);
private readonly Regex mvcServicePath = new Regex(@"DesktopModules/MVC/", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private IRedirectionController redirectionController;

public string ModuleName => "MobileRedirectModule";
Expand Down

0 comments on commit d975eaa

Please sign in to comment.