From 931232dcb4f2330ebc5b30b7a7634eaf9c6dc565 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 25 Dec 2023 10:12:33 +0800 Subject: [PATCH] Change the `default pfx password` in `README` file. --- .../Templates/RandomizeAuthServerPassPhraseStep.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeAuthServerPassPhraseStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeAuthServerPassPhraseStep.cs index a41c870f41..b29998438a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeAuthServerPassPhraseStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeAuthServerPassPhraseStep.cs @@ -12,6 +12,8 @@ public class RandomizeAuthServerPassPhraseStep : ProjectBuildPipelineStep private const string LocalhostPfx = "localhost.pfx -p 00000000-0000-0000-0000-000000000000"; private const string DotnetDevCerts = "openiddict.pfx -p 00000000-0000-0000-0000-000000000000"; private const string ProductionEncryptionAndSigningCertificate = "AddProductionEncryptionAndSigningCertificate(\"openiddict.pfx\", \"00000000-0000-0000-0000-000000000000\");"; + private const string ReadmeCallout = "`00000000-0000-0000-0000-000000000000`"; + private readonly static string RandomPassword = Guid.NewGuid().ToString("D"); public readonly static string RandomOpenIddictPassword = Guid.NewGuid().ToString("D"); @@ -59,6 +61,13 @@ public class RandomizeAuthServerPassPhraseStep : ProjectBuildPipelineStep RandomOpenIddictPassword)); } + if (lines[i].Contains(ReadmeCallout)) + { + lines[i] = lines[i].Replace(ReadmeCallout, + ReadmeCallout.Replace(DefaultPassword, + RandomOpenIddictPassword)); + } + if (lines[i].Contains(ProductionEncryptionAndSigningCertificate)) { lines[i] = lines[i].Replace(ProductionEncryptionAndSigningCertificate,