From ba4b84d7f454119ac90d191c2389c5ba8d0438fe Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 21 Jan 2019 11:09:13 +0100 Subject: [PATCH 1/2] Fixes #4166 - Outgoing connections sometimes fail because they require TLS 1.2 --- src/Umbraco.Web/WebBootManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index 7863033c4b..dbab3d2346 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -4,6 +4,7 @@ using System.Collections.Specialized; using System.Configuration; using System.IO; using System.Linq; +using System.Net; using System.Web; using System.Web.Configuration; using System.Web.Http; @@ -130,6 +131,10 @@ namespace Umbraco.Web InstallHelper insHelper = new InstallHelper(UmbracoContext.Current); insHelper.DeleteLegacyInstaller(); + // Tell .net 4.5 that we also want to try connecting over TLS 1.2, not just 1.1 + if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false) + ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12; + return this; } From e252a0849b8ae614d328de6150d846cf01320712 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 28 Nov 2018 21:50:23 +0100 Subject: [PATCH 2/2] Add "default empty" prevalue to date and datetime --- .../propertyeditors/datepicker/datepicker.controller.js | 4 ++-- src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js index 70c6bb4531..c8bd070944 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js @@ -145,9 +145,9 @@ function dateTimePickerController($scope, notificationsService, assetsService, a var element = $element.find("div:first"); - // Open the datepicker and add a changeDate eventlistener + // Open the datepicker and add a changeDate eventlistener element - .datetimepicker(angular.extend({ useCurrent: true }, $scope.model.config)) + .datetimepicker(angular.extend({ useCurrent: $scope.model.config.defaultEmpty !== "1" }, $scope.model.config)) .on("dp.change", applyDate) .on("dp.error", function(a, b, c) { $scope.hasDatetimePickerValue = false; diff --git a/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs b/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs index dde4d6c2f1..709212b6ff 100644 --- a/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/DatePreValueEditor.cs @@ -6,5 +6,8 @@ namespace Umbraco.Web.PropertyEditors { [PreValueField("format", "Date format", "textstring", Description = "If left empty then the format is YYYY-MM-DD. (see momentjs.com for supported formats)")] public string DefaultValue { get; set; } + + [PreValueField("defaultEmpty", "Default empty", "boolean", Description = "When enabled the date picker will remain empty when opened. Otherwise it will default to \"today\".")] + public string DefaultEmpty { get; set; } } -} \ No newline at end of file +}