Skip to content
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
5 changes: 4 additions & 1 deletion src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ private static bool IsPluginControllerRoute(string path)
/// <summary>
/// Checks if the current uri is an install request
/// </summary>
public bool IsInstallerRequest(string absPath) => absPath.InvariantStartsWith(_installPath);
public bool IsInstallerRequest(string absPath) =>
absPath.InvariantEquals(_installPath)
|| absPath.InvariantStartsWith(_installPath.EnsureEndsWith('/'))
|| absPath.InvariantStartsWith(_installPath.EnsureEndsWith('?'));

/// <summary>
/// Rudimentary check to see if it's not a server side request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ public void Is_Back_Office_Request(string input, string virtualPath, bool expect
[TestCase("http://www.domain.com/install/test/test", true)]
[TestCase("http://www.domain.com/Install/test/test.aspx", true)]
[TestCase("http://www.domain.com/install/test/test.js", true)]
[TestCase("http://www.domain.com/install?param=value", true)]
[TestCase("http://www.domain.com/instal", false)]
[TestCase("http://www.domain.com/umbraco", false)]
[TestCase("http://www.domain.com/umbraco/umbraco", false)]
[TestCase("http://www.domain.com/installation", false)]
[TestCase("http://www.domain.com/installation/", false)]
[TestCase("http://www.domain.com/installation/test", false)]
[TestCase("http://www.domain.com/installation/test.js", false)]
[TestCase("http://www.domain.com/installation?param=value", false)]
public void Is_Installer_Request(string input, bool expected)
{
var source = new Uri(input);
Expand Down