Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MvcServicePath regex matching ignore case. #6031

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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