diff --git a/src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs b/src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs index bd63b51711..9cabd97dd6 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs @@ -329,7 +329,9 @@ public class BackOfficeController : UmbracoController [AllowAnonymous] public ActionResult ExternalLogin(string provider, string? redirectUrl = null) { - if (redirectUrl == null || Uri.TryCreate(redirectUrl, UriKind.Absolute, out _)) + // Only relative urls are accepted as redirect url + // We can't simply use Uri.TryCreate with kind Absolute, as in Linux any relative url would be seen as an absolute file uri + if (redirectUrl == null || !Uri.TryCreate(redirectUrl, UriKind.RelativeOrAbsolute, out Uri? redirectUri) || redirectUri.IsAbsoluteUri) { redirectUrl = Url.Action(nameof(Default), this.GetControllerName()); }