Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/core-cannot-use-system-web

This commit is contained in:
Bjarke Berg
2019-12-02 14:13:33 +01:00
168 changed files with 7442 additions and 6114 deletions

View File

@@ -75,7 +75,8 @@ namespace Umbraco.Web.Security
/// </param>
public static void ForUmbracoBackOffice(this AuthenticationOptions options, string style, string icon, string callbackPath = null)
{
if (string.IsNullOrEmpty(options.AuthenticationType)) throw new ArgumentNullOrEmptyException("options.AuthenticationType");
if (options == null) throw new ArgumentNullException(nameof(options));
if (string.IsNullOrEmpty(options.AuthenticationType)) throw new InvalidOperationException("The authentication type can't be null or empty.");
//Ensure the prefix is set
if (options.AuthenticationType.StartsWith(Constants.Security.BackOfficeExternalAuthenticationTypePrefix) == false)

View File

@@ -95,7 +95,7 @@ namespace Umbraco.Web.Security.Providers
if (m == null) return false;
string salt;
var encodedPassword = PasswordSecurity.EncryptOrHashNewPassword(newPassword, out salt);
var encodedPassword = PasswordSecurity.HashNewPassword(newPassword, out salt);
m.RawPasswordValue = PasswordSecurity.FormatPasswordForStorage(encodedPassword, salt);
m.LastPasswordChangeDate = DateTime.Now;
@@ -155,7 +155,7 @@ namespace Umbraco.Web.Security.Providers
}
string salt;
var encodedPassword = PasswordSecurity.EncryptOrHashNewPassword(password, out salt);
var encodedPassword = PasswordSecurity.HashNewPassword(password, out salt);
var member = MemberService.CreateWithIdentity(
username,
@@ -417,7 +417,7 @@ namespace Umbraco.Web.Security.Providers
}
string salt;
var encodedPassword = PasswordSecurity.EncryptOrHashNewPassword(generatedPassword, out salt);
var encodedPassword = PasswordSecurity.HashNewPassword(generatedPassword, out salt);
m.RawPasswordValue = PasswordSecurity.FormatPasswordForStorage(encodedPassword, salt);
m.LastPasswordChangeDate = DateTime.Now;
MemberService.Save(m);