diff --git a/.gitignore b/.gitignore index ce1b7b9114..fd94476152 100644 --- a/.gitignore +++ b/.gitignore @@ -107,4 +107,5 @@ src/Umbraco.Web.UI/[Cc]onfig/appSettings.config src/Umbraco.Web.UI/[Cc]onfig/connectionStrings.config src/Umbraco.Web.UI/umbraco/plugins/* src/Umbraco.Web.UI/umbraco/js/init.js -build/ApiDocs/Output/* +build/ApiDocs/* +build/ApiDocs/Output/* \ No newline at end of file diff --git a/build/Build.bat b/build/Build.bat index 0c9b1f1ad2..706bfc61c2 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -1,5 +1,5 @@ @ECHO OFF -SET release=7.0.2 +SET release=7.0.3 SET comment= SET version=%release% diff --git a/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs b/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs index 3aa4321071..0536647f55 100644 --- a/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs +++ b/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs @@ -30,7 +30,7 @@ namespace Umbraco.Core.Configuration int oldVersion; int.TryParse(versionAttribute.Value, out oldVersion); - var newVersion = oldVersion + 1; + var newVersion = oldVersion + 100; versionAttribute.SetValue(newVersion); clientDependencyConfigXml.Save(_fileName, SaveOptions.DisableFormatting); diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index f4517608a4..5fe2f1c160 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration { public class UmbracoVersion { - private static readonly Version Version = new Version("7.0.2"); + private static readonly Version Version = new Version("7.0.3"); /// /// Gets the current version of Umbraco. diff --git a/src/Umbraco.Core/ObjectExtensions.cs b/src/Umbraco.Core/ObjectExtensions.cs index 603c508e0f..026a9fcef5 100644 --- a/src/Umbraco.Core/ObjectExtensions.cs +++ b/src/Umbraco.Core/ObjectExtensions.cs @@ -292,7 +292,20 @@ namespace Umbraco.Core else if (destinationType == typeof(DateTime)) { DateTime value; - return DateTime.TryParse(input, out value) ? Attempt.Succeed(value) : Attempt.Fail(); + if (DateTime.TryParse(input, out value)) + { + switch (value.Kind) + { + case DateTimeKind.Unspecified: + case DateTimeKind.Utc: + return Attempt.Succeed(value); + case DateTimeKind.Local: + return Attempt.Succeed(value.ToUniversalTime()); + default: + throw new ArgumentOutOfRangeException(); + } + } + return Attempt.Fail(); } else if (destinationType == typeof(DateTimeOffset)) { @@ -526,7 +539,7 @@ namespace Umbraco.Core if (type == typeof(bool)) return XmlConvert.ToString((bool)value); if (type == typeof(byte)) return XmlConvert.ToString((byte)value); if (type == typeof(char)) return XmlConvert.ToString((char)value); - if (type == typeof(DateTime)) return XmlConvert.ToString((DateTime)value, XmlDateTimeSerializationMode.RoundtripKind); + if (type == typeof(DateTime)) return XmlConvert.ToString((DateTime)value, XmlDateTimeSerializationMode.Unspecified); if (type == typeof(DateTimeOffset)) return XmlConvert.ToString((DateTimeOffset)value); if (type == typeof(decimal)) return XmlConvert.ToString((decimal)value); if (type == typeof(double)) return XmlConvert.ToString((double)value); diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs index 435a9833a6..769f3928a7 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs @@ -26,13 +26,14 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters if (source == null) return DateTime.MinValue; // in XML a DateTime is: string - format "yyyy-MM-ddTHH:mm:ss" + // Actually, not always sometimes it is formatted in UTC style with 'Z' suffixed on the end but that is due to this bug: + // http://issues.umbraco.org/issue/U4-4145, http://issues.umbraco.org/issue/U4-3894 + // We should just be using TryConvertTo instead. var sourceString = source as string; if (sourceString != null) { - DateTime value; - return DateTime.TryParseExact(sourceString, "yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.None, out value) - ? value - : DateTime.MinValue; + var attempt = sourceString.TryConvertTo(); + return attempt.Success == false ? DateTime.MinValue : attempt.Result; } // in the database a DateTime is: DateTime @@ -47,7 +48,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters public override object ConvertSourceToXPath(PublishedPropertyType propertyType, object source, bool preview) { // source should come from ConvertSource and be a DateTime already - return XmlConvert.ToString((DateTime) source, "yyyy-MM-ddTHH:mm:ss"); + return XmlConvert.ToString((DateTime)source, XmlDateTimeSerializationMode.Unspecified); } } } \ No newline at end of file diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs new file mode 100644 index 0000000000..45563d11e8 --- /dev/null +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs @@ -0,0 +1,38 @@ +using System.Linq; +using Umbraco.Core.Models.PublishedContent; + +namespace Umbraco.Core.PropertyEditors.ValueConverters +{ + /// + /// Ensures that no matter what is selected in (editor), the value results in a string. + /// + /// + /// For more details see issues http://issues.umbraco.org/issue/U4-3776 (MNTP) + /// and http://issues.umbraco.org/issue/U4-4160 (media picker). + /// The cache level is set to .Content because the string is supposed to depend + /// on the source value only, and not on any other content. It is NOT appropriate + /// to use that converter for values whose .ToString() would depend on other content. + /// + [DefaultPropertyValueConverter] + [PropertyValueType(typeof(string))] + [PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)] + public class MustBeStringValueConverter : PropertyValueConverterBase + { + private static readonly string[] Aliases = + { + Constants.PropertyEditors.MultiNodeTreePickerAlias, + Constants.PropertyEditors.MultipleMediaPickerAlias + }; + + public override bool IsConverter(PublishedPropertyType propertyType) + { + return Aliases.Contains(propertyType.PropertyEditorAlias); + } + + public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview) + { + if (source == null) return null; + return source.ToString(); + } + } +} diff --git a/src/Umbraco.Core/Security/MembershipProviderBase.cs b/src/Umbraco.Core/Security/MembershipProviderBase.cs index f5ba315177..d0738b24ea 100644 --- a/src/Umbraco.Core/Security/MembershipProviderBase.cs +++ b/src/Umbraco.Core/Security/MembershipProviderBase.cs @@ -711,6 +711,11 @@ namespace Umbraco.Core.Security var decrypted = DecryptPassword(dbPassword); return decrypted == password; case MembershipPasswordFormat.Hashed: + + //only triggered when we set the initial installer password + if (dbPassword == "default" && password == dbPassword) + return true; + string salt; var storedHashedPass = StoredPassword(dbPassword, out salt); var hashed = EncryptOrHashPassword(password, salt); diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 18cd086cbe..f29a9f5b29 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -368,6 +368,7 @@ + diff --git a/src/Umbraco.Tests/ObjectExtensionsTests.cs b/src/Umbraco.Tests/ObjectExtensionsTests.cs index 420a2eb856..4e78b2da1f 100644 --- a/src/Umbraco.Tests/ObjectExtensionsTests.cs +++ b/src/Umbraco.Tests/ObjectExtensionsTests.cs @@ -104,30 +104,24 @@ namespace Umbraco.Tests } } - [Test] - public virtual void CanConvertStringToDateTime() + [TestCase("2012-11-10", true)] + [TestCase("2012/11/10", true)] + [TestCase("10/11/2012", true)]// assuming your culture uses DD/MM/YYYY + [TestCase("11/10/2012", false)]// assuming your culture uses DD/MM/YYYY + [TestCase("Sat 10, Nov 2012", true)] + [TestCase("Saturday 10, Nov 2012", true)] + [TestCase("Sat 10, November 2012", true)] + [TestCase("Saturday 10, November 2012", true)] + [TestCase("2012-11-10 13:14:15", true)] + [TestCase("2012-11-10T13:14:15Z", true)] + public virtual void CanConvertStringToDateTime(string date, bool outcome) { var dateTime = new DateTime(2012, 11, 10, 13, 14, 15); - var testCases = new Dictionary - { - {"2012-11-10", true}, - {"2012/11/10", true}, - {"10/11/2012", true}, // assuming your culture uses DD/MM/YYYY - {"11/10/2012", false}, // assuming your culture uses DD/MM/YYYY - {"Sat 10, Nov 2012", true}, - {"Saturday 10, Nov 2012", true}, - {"Sat 10, November 2012", true}, - {"Saturday 10, November 2012", true}, - {"2012-11-10 13:14:15", true} - }; - foreach (var testCase in testCases) - { - var result = testCase.Key.TryConvertTo(); + var result = date.TryConvertTo(); - Assert.IsTrue(result.Success, testCase.Key); - Assert.AreEqual(DateTime.Equals(dateTime.Date, result.Result.Date), testCase.Value, testCase.Key); - } + Assert.IsTrue(result.Success, date); + Assert.AreEqual(DateTime.Equals(dateTime.Date, result.Result.Date), outcome, date); } [Test] diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js index 132bc2d578..3c68e71c17 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js @@ -2,37 +2,37 @@ //with a specified callback, this callback will receive an object with a selection on it angular.module('umbraco') .controller("Umbraco.PropertyEditors.ContentPickerController", - + function($scope, dialogService, entityResource, editorState, $log, iconHelper, $routeParams){ - $scope.renderModel = []; - $scope.ids = $scope.model.value ? $scope.model.value.split(',') : []; - - //configuration - $scope.cfg = { - multiPicker: "0", - entityType: "Document", + $scope.renderModel = []; + $scope.ids = $scope.model.value ? $scope.model.value.split(',') : []; + + //configuration + $scope.cfg = { + multiPicker: "0", + entityType: "Document", filterCssClass: "not-allowed not-published", - startNode:{ + startNode: { query: "", - type: "content", - id: -1 - } - }; + type: "content", + id: -1 + } + }; + + if ($scope.model.config) { + $scope.cfg = angular.extend($scope.cfg, $scope.model.config); + } - if($scope.model.config){ - $scope.cfg = angular.extend($scope.cfg, $scope.model.config); - } - //Umbraco persists boolean for prevalues as "0" or "1" so we need to convert that! - $scope.cfg.multiPicker = ($scope.cfg.multiPicker === "0" ? false : true); + $scope.cfg.multiPicker = ($scope.cfg.multiPicker === "0" ? false : true); - if($scope.cfg.startNode.type === "member"){ - $scope.cfg.entityType = "Member"; - } - else if ($scope.cfg.startNode.type === "media") { - $scope.cfg.entityType = "Media"; - } + if ($scope.cfg.startNode.type === "member") { + $scope.cfg.entityType = "Member"; + } + else if ($scope.cfg.startNode.type === "media") { + $scope.cfg.entityType = "Media"; + } //if we have a query for the startnode, we will use that. if($scope.cfg.startNode.query){ @@ -44,38 +44,38 @@ angular.module('umbraco') $scope.cfg.startNodeId = $scope.cfg.startNode.id; } - $scope.cfg.callback = populate; - $scope.cfg.treeAlias = $scope.cfg.startNode.type; - $scope.cfg.section = $scope.cfg.startNode.type; - - //load current data - entityResource.getByIds($scope.ids, $scope.cfg.entityType).then(function(data){ - _.each(data, function (item, i) { - item.icon = iconHelper.convertFromLegacyIcon(item.icon); - $scope.renderModel.push({name: item.name, id: item.id, icon: item.icon}); - }); - }); + $scope.cfg.callback = populate; + $scope.cfg.treeAlias = $scope.cfg.startNode.type; + $scope.cfg.section = $scope.cfg.startNode.type; + + //load current data + entityResource.getByIds($scope.ids, $scope.cfg.entityType).then(function (data) { + _.each(data, function (item, i) { + item.icon = iconHelper.convertFromLegacyIcon(item.icon); + $scope.renderModel.push({ name: item.name, id: item.id, icon: item.icon }); + }); + }); - //dialog - $scope.openContentPicker =function(){ - var d = dialogService.treePicker($scope.cfg); - }; + //dialog + $scope.openContentPicker = function () { + var d = dialogService.treePicker($scope.cfg); + }; - $scope.remove =function(index){ - $scope.renderModel.splice(index, 1); - }; + $scope.remove = function (index) { + $scope.renderModel.splice(index, 1); + }; - $scope.add =function(item){ - if($scope.ids.indexOf(item.id) < 0){ - item.icon = iconHelper.convertFromLegacyIcon(item.icon); - $scope.renderModel.push({name: item.name, id: item.id, icon: item.icon}); - } - }; + $scope.add = function (item) { + if ($scope.ids.indexOf(item.id) < 0) { + item.icon = iconHelper.convertFromLegacyIcon(item.icon); + $scope.renderModel.push({ name: item.name, id: item.id, icon: item.icon }); + } + }; - $scope.clear = function() { + $scope.clear = function () { $scope.renderModel = []; }; @@ -83,10 +83,10 @@ angular.module('umbraco') // because the ui-sortable doesn't dispatch an event after the digest of the sort operation. Any of the events for UI sortable // occur after the DOM has updated but BEFORE the digest has occured so the model has NOT changed yet - it even states so in the docs. // In their source code there is no event so we need to just subscribe to our model changes here. - //This also makes it easier to manage models, we update one and the rest will just work. - $scope.$watch(function() { + //This also makes it easier to manage models, we update one and the rest will just work. + $scope.$watch(function () { //return the joined Ids as a string to watch - return _.map($scope.renderModel, function(i) { + return _.map($scope.renderModel, function (i) { return i.id; }).join(); }, function (newVal) { @@ -97,22 +97,22 @@ angular.module('umbraco') }); $scope.$on("formSubmitting", function (ev, args) { - $scope.model.value = trim($scope.ids.join(), ","); + $scope.model.value = trim($scope.ids.join(), ","); }); - function trim(str, chr) { - var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^'+chr+'+|'+chr+'+$', 'g'); - return str.replace(rgxtrim, ''); - } + function trim(str, chr) { + var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^' + chr + '+|' + chr + '+$', 'g'); + return str.replace(rgxtrim, ''); + } - function populate(data){ - if(angular.isArray(data)){ - _.each(data, function (item, i) { - $scope.add(item); - }); - }else{ - $scope.clear(); - $scope.add(data); - } - } -}); \ No newline at end of file + function populate(data) { + if (angular.isArray(data)) { + _.each(data, function (item, i) { + $scope.add(item); + }); + } else { + $scope.clear(); + $scope.add(data); + } + } + }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index ab7f865b06..a61e8011b2 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -2643,9 +2643,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\" True True - 7020 + 7030 / - http://localhost:7020 + http://localhost:7030 False False diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MntpStringValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MntpStringValueConverter.cs deleted file mode 100644 index 14cc3a9b57..0000000000 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MntpStringValueConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors.ValueConverters -{ - /// - /// Ensures that no matter what is selected in MNTP that the value results in a string - /// - /// - /// See here for full details:http://issues.umbraco.org/issue/U4-3776 - /// - [DefaultPropertyValueConverter] - [PropertyValueType(typeof (string))] - [PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Request)] - public class MntpStringValueConverter : PropertyValueConverterBase - { - public override bool IsConverter(PublishedPropertyType propertyType) - { - return propertyType.PropertyEditorAlias == Constants.PropertyEditors.MultiNodeTreePickerAlias; - } - - public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview) - { - if (source == null) return null; - return source.ToString(); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index c762874a88..9d8a34f3b2 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -478,6 +478,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache // I'm not sure that _properties contains all properties including those without a value, // neither that GetProperty will return a property without a value vs. null... @zpqrtbnk + // List of properties that will appear in the XML and do not match + // anything in the ContentType, so they must be ignored. + private static readonly string[] IgnoredKeys = { "version", "isDoc", "key" }; + public DictionaryPublishedContent( IDictionary valueDictionary, Func getParent, @@ -528,8 +532,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { IPublishedProperty property = null; - // must ignore that one - if (i.Key == "version" || i.Key == "isDoc") continue; + // must ignore those + if (IgnoredKeys.Contains(i.Key)) continue; if (i.Key.InvariantStartsWith("__")) { @@ -540,6 +544,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache { // use property type to ensure proper conversion var propertyType = _contentType.GetPropertyType(i.Key); + if (propertyType == null) + throw new Exception("Internal error, property '" + i.Key + "' is not a valid property for that type of content."); property = new XmlPublishedProperty(propertyType, false, i.Value); // false :: never preview a media } diff --git a/src/Umbraco.Web/Strategies/DataTypes/LegacyUploadFieldWorkaround.cs b/src/Umbraco.Web/Strategies/DataTypes/LegacyUploadFieldWorkaround.cs index 20ba39dccc..f7168b7e66 100644 --- a/src/Umbraco.Web/Strategies/DataTypes/LegacyUploadFieldWorkaround.cs +++ b/src/Umbraco.Web/Strategies/DataTypes/LegacyUploadFieldWorkaround.cs @@ -81,10 +81,15 @@ namespace Umbraco.Web.Strategies.DataTypes var dimensions = isImageType ? GetDimensions(path, fileSystem) : null; - // only add dimensions to web images - content.getProperty(uploadFieldConfigNode.WidthFieldAlias).Value = isImageType ? dimensions.Item1.ToString(CultureInfo.InvariantCulture) : string.Empty; - content.getProperty(uploadFieldConfigNode.HeightFieldAlias).Value = isImageType ? dimensions.Item2.ToString(CultureInfo.InvariantCulture) : string.Empty; - content.getProperty(uploadFieldConfigNode.LengthFieldAlias).Value = size == default(long) ? string.Empty : size.ToString(CultureInfo.InvariantCulture); + + if (isImageType) + { + // only add dimensions to web images + content.getProperty(uploadFieldConfigNode.WidthFieldAlias).Value = dimensions.Item1.ToString(CultureInfo.InvariantCulture); + content.getProperty(uploadFieldConfigNode.HeightFieldAlias).Value = dimensions.Item2.ToString(CultureInfo.InvariantCulture); + } + + content.getProperty(uploadFieldConfigNode.LengthFieldAlias).Value = size == default(long) ? string.Empty : size.ToString(CultureInfo.InvariantCulture); content.getProperty(uploadFieldConfigNode.ExtensionFieldAlias).Value = string.IsNullOrEmpty(extension) ? string.Empty : extension; } diff --git a/src/Umbraco.Web/UI/JavaScript/ServerVariablesParser.cs b/src/Umbraco.Web/UI/JavaScript/ServerVariablesParser.cs index bab84de3ad..fa34fb3ee9 100644 --- a/src/Umbraco.Web/UI/JavaScript/ServerVariablesParser.cs +++ b/src/Umbraco.Web/UI/JavaScript/ServerVariablesParser.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.UI.JavaScript /// /// Could allow developers to add custom variables on startup /// - public static EventHandler> Parsing; + public static event EventHandler> Parsing; internal const string Token = "##Variables##"; @@ -24,7 +24,8 @@ namespace Umbraco.Web.UI.JavaScript } var json = JObject.FromObject(items); - return vars.Replace(Token, json.ToString()); + return vars.Replace(Token, json.ToString()); + } } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ce74fb02a8..a2b131709d 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -397,7 +397,6 @@ - diff --git a/src/Umbraco.Web/WebServices/DomainsApiController.cs b/src/Umbraco.Web/WebServices/DomainsApiController.cs index 062a9dfa62..02a4269ac5 100644 --- a/src/Umbraco.Web/WebServices/DomainsApiController.cs +++ b/src/Umbraco.Web/WebServices/DomainsApiController.cs @@ -64,12 +64,14 @@ namespace Umbraco.Web.WebServices // process domains - foreach (var domain in domains.Where(d => model.Domains.All(m => !m.Name.Equals(d.Name, StringComparison.OrdinalIgnoreCase)))) + // delete every (non-wildcard) domain, that exists in the DB yet is not in the model + foreach (var domain in domains.Where(d => d.IsWildcard == false && model.Domains.All(m => m.Name.Equals(d.Name, StringComparison.OrdinalIgnoreCase) == false))) domain.Delete(); var names = new List(); - foreach (var domainModel in model.Domains.Where(m => !string.IsNullOrWhiteSpace(m.Name))) + // create or update domains in the model + foreach (var domainModel in model.Domains.Where(m => string.IsNullOrWhiteSpace(m.Name) == false)) { language = languages.FirstOrDefault(l => l.id == domainModel.Lang); if (language == null) @@ -90,7 +92,7 @@ namespace Umbraco.Web.WebServices Domain.MakeNew(name, model.NodeId, domainModel.Lang); } - model.Valid = model.Domains.All(m => !m.Duplicate); + model.Valid = model.Domains.All(m => m.Duplicate == false); return model; } diff --git a/src/umbraco.providers/UsersMembershipProvider.cs b/src/umbraco.providers/UsersMembershipProvider.cs index 0843b998c0..1794ed26a3 100644 --- a/src/umbraco.providers/UsersMembershipProvider.cs +++ b/src/umbraco.providers/UsersMembershipProvider.cs @@ -497,19 +497,6 @@ namespace umbraco.providers return false; } - //Due to the way this legacy provider worked, when it 'validated' a password passed in, it would allow - // having the already hashed/encrypted password checked directly - this is bad but hey, we gotta support legacy - // don't we. - - //So, first we'll check if the user object's db stored password (already hashed/encrypted in the db) matches the password that - // has been passed in, if so then we will confirm that it is valid. If it doesn't we'll attempt to hash/encrypt the passed in - // password and then validate it - the way it is supposed to be done. - - if (user.Password == password) - { - return true; - } - return CheckPassword(password, user.Password); } }