Fixed check to support unix/linux OS (#16045)

This commit is contained in:
Bjarke Berg
2024-04-12 14:57:31 +02:00
committed by GitHub
parent 89de08a1e8
commit 2f0b3d055f

View File

@@ -54,7 +54,7 @@ public class BackOfficeLoginController : Controller
model.UmbracoUrl = _hostingEnvironment.ToAbsolute(_globalSettings.UmbracoPath);
}
if (Uri.TryCreate(model.ReturnUrl, UriKind.Absolute, out _))
if ( Uri.TryCreate(model.ReturnUrl, UriKind.Relative, out _) is false) // Needs to test for relative and not absolute, as /whatever/ is an absolute path on linux
{
return BadRequest("ReturnUrl must be a relative path.");
}