From cb88865a7df5fd0b1ab405841fcbc1d8020feea4 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 31 Aug 2020 15:23:43 +0200 Subject: [PATCH 1/6] Added iconApiBaseUrl to BareMinimumServerVariables --- src/Umbraco.Web/Editors/BackOfficeServerVariables.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 454338112c..bdcb93099b 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -73,7 +73,7 @@ namespace Umbraco.Web.Editors //this is the filter for the keys that we'll keep based on the full version of the server vars var keepOnlyKeys = new Dictionary { - {"umbracoUrls", new[] {"authenticationApiBaseUrl", "serverVarsJs", "externalLoginsUrl", "currentUserApiBaseUrl"}}, + {"umbracoUrls", new[] {"authenticationApiBaseUrl", "serverVarsJs", "externalLoginsUrl", "currentUserApiBaseUrl", "iconApiBaseUrl"}}, {"umbracoSettings", new[] {"allowPasswordReset", "imageFileTypes", "maxFileSize", "loginBackgroundImage", "canSendRequiredEmail", "usernameIsEmail"}}, {"application", new[] {"applicationPath", "cacheBuster"}}, {"isDebuggingEnabled", new string[] { }}, From edca4af7f43eb586ba91810729569f7a9a3fcce7 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 2 Sep 2020 10:03:35 +0200 Subject: [PATCH 2/6] Fix MaxFailedAccessAttemptsBeforeLockout from config --- src/Umbraco.Web.UI.NetCore/appsettings.json | 110 ++++++++++---------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/src/Umbraco.Web.UI.NetCore/appsettings.json b/src/Umbraco.Web.UI.NetCore/appsettings.json index ee67d0cf58..2044a8e696 100644 --- a/src/Umbraco.Web.UI.NetCore/appsettings.json +++ b/src/Umbraco.Web.UI.NetCore/appsettings.json @@ -1,60 +1,60 @@ { - "ConnectionStrings": { + "ConnectionStrings": { "umbracoDbDSN": "" - }, - "Umbraco": { - "CMS": { - "Content": { - "Notifications": { - "Email": "your@email.here" - }, - "MacroErrors": "throw" - }, - "Global": { - "DefaultUILanguage": "en-us", - "HideTopLevelNodeFromPath": true, - "Path": "~/umbraco", - "TimeOutInMinutes": 20, - "UseHttps": false - }, - "Hosting": { - "Debug": false - }, - "KeepAlive": { - "DisableKeepAliveTask": false, - "KeepAlivePingUrl": "{umbracoApplicationUrl}/api/keepalive/ping" - }, - "RequestHandler": { - "ConvertUrlsToAscii": "try" - }, - "RuntimeMinification": { - "dataFolder": "App_Data\\Smidge", - "version": "1" - }, - "Security": { - "KeepUserLoggedIn": false, - "UsernameIsEmail": true, - "HideDisabledUsersInBackoffice": false, - "UserPassword": { - "RequiredLength": 10, - "RequireNonLetterOrDigit": false, - "RequireDigit": false, - "RequireLowercase": false, - "RequireUppercase": false, - "MaxFailedAccessAttemptsBeforeLockout": 0 - }, - "MemberPassword": { - "RequiredLength": 10, - "RequireNonLetterOrDigit": false, - "RequireDigit": false, - "RequireLowercase": false, - "RequireUppercase": false, - "MaxFailedAccessAttemptsBeforeLockout": 0 - } - }, - "Tours": { - "EnableTours": true - } + }, + "Umbraco": { + "CMS": { + "Content": { + "Notifications": { + "Email": "your@email.here" + }, + "MacroErrors": "throw" + }, + "Global": { + "DefaultUILanguage": "en-us", + "HideTopLevelNodeFromPath": true, + "Path": "~/umbraco", + "TimeOutInMinutes": 20, + "UseHttps": false + }, + "Hosting": { + "Debug": false + }, + "KeepAlive": { + "DisableKeepAliveTask": false, + "KeepAlivePingUrl": "{umbracoApplicationUrl}/api/keepalive/ping" + }, + "RequestHandler": { + "ConvertUrlsToAscii": "try" + }, + "RuntimeMinification": { + "dataFolder": "App_Data\\Smidge", + "version": "1" + }, + "Security": { + "KeepUserLoggedIn": false, + "UsernameIsEmail": true, + "HideDisabledUsersInBackoffice": false, + "UserPassword": { + "RequiredLength": 10, + "RequireNonLetterOrDigit": false, + "RequireDigit": false, + "RequireLowercase": false, + "RequireUppercase": false, + "MaxFailedAccessAttemptsBeforeLockout": 5 + }, + "MemberPassword": { + "RequiredLength": 10, + "RequireNonLetterOrDigit": false, + "RequireDigit": false, + "RequireLowercase": false, + "RequireUppercase": false, + "MaxFailedAccessAttemptsBeforeLockout": 5 } + }, + "Tours": { + "EnableTours": true + } } + } } From 6f6d9cb938fcc7319871be01bd6c99975bfcde39 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 3 Sep 2020 14:37:29 +0200 Subject: [PATCH 3/6] Fixed issue with wrong link to GetSetup method on InstallApiController --- src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs b/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs index 31ff07b964..e3f335150e 100644 --- a/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs +++ b/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs @@ -54,7 +54,9 @@ namespace Umbraco.Extensions /// public static string GetInstallerApiUrl(this LinkGenerator linkGenerator) { - return linkGenerator.GetPathByAction(nameof(InstallController.Index), ControllerExtensions.GetControllerName(), new { area = Constants.Web.Mvc.InstallArea }).EnsureEndsWith('/'); + return linkGenerator.GetPathByAction(nameof(InstallApiController.GetSetup), + ControllerExtensions.GetControllerName(), + new { area = Constants.Web.Mvc.InstallArea }); } /// From ed2fa27b18336655b94b076c3a9e75ff71703bfb Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 4 Sep 2020 09:26:24 +0200 Subject: [PATCH 4/6] Fix issue with login url Signed-off-by: Bjarke Berg --- src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs b/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs index e3f335150e..f2babdb07c 100644 --- a/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs +++ b/src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs @@ -56,7 +56,7 @@ namespace Umbraco.Extensions { return linkGenerator.GetPathByAction(nameof(InstallApiController.GetSetup), ControllerExtensions.GetControllerName(), - new { area = Constants.Web.Mvc.InstallArea }); + new { area = Constants.Web.Mvc.InstallArea }).TrimEnd(nameof(InstallApiController.GetSetup)); } /// From d69c93e4eea871ac5029462423c86525e46e7be7 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 4 Sep 2020 09:32:35 +0200 Subject: [PATCH 5/6] https://github.com/umbraco/Umbraco-CMS/issues/8814 - Decoreated endpoints with DetermineAmbiguousActionByPassingParametersAttribute Signed-off-by: Bjarke Berg --- src/Umbraco.Web.BackOffice/Controllers/EntityController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs b/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs index 433cf6f345..1afe9bccf4 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs @@ -248,6 +248,7 @@ namespace Umbraco.Web.BackOffice.Controllers /// UDI of the entity to fetch URL for /// The culture to fetch the URL for /// The URL or path to the item + [DetermineAmbiguousActionByPassingParameters] public HttpResponseMessage GetUrl(Udi udi, string culture = "*") { var intId = _entityService.GetId(udi); @@ -281,6 +282,7 @@ namespace Umbraco.Web.BackOffice.Controllers /// /// We are not restricting this with security because there is no sensitive data /// + [DetermineAmbiguousActionByPassingParameters] public HttpResponseMessage GetUrl(int id, UmbracoEntityTypes type, string culture = null) { culture = culture ?? ClientCulture(); From a58859ade636d784d9a6a8bff394fe21676a88dc Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 4 Sep 2020 09:39:46 +0200 Subject: [PATCH 6/6] updated version to 0.5.0-alpha002 Signed-off-by: Bjarke Berg --- src/SolutionInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index 59c75192b9..26e46eab0a 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -19,4 +19,4 @@ using System.Resources; // these are FYI and changed automatically [assembly: AssemblyFileVersion("0.5.0")] -[assembly: AssemblyInformationalVersion("0.5.0-alpha001")] +[assembly: AssemblyInformationalVersion("0.5.0-alpha002")]