Last active
January 2, 2019 17:39
-
-
Save grant-killian/1c8a2d7e6889e8d90decdf2fbfe540d8 to your computer and use it in GitHub Desktop.
Update Sitecore's Identity Server to use a more robust hash algorithm for .Net membership. See https://grantkillian.wordpress.com/2019/01/02/sitecore-commerce-security-hardening-note/ for more context.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$siteNamePrompt = Read-Host "enter Identity Server website name" | |
$site = get-website -name $siteNamePrompt | |
$appSettingsPath = "{0}\wwwroot\appsettings.json" -f $site.physicalPath | |
<# replace: | |
"PasswordHashAlgorithm":"SHA1"}, | |
with: | |
"PasswordHashAlgorithm":"SHA512"}, | |
#> | |
(Get-Content $appSettingsPath).replace("""PasswordHashAlgorithm"":""SHA1""},", """PasswordHashAlgorithm"":""SHA512""},") | Set-Content $appSettingsPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment