Skip to content

Commit 7f53787

Browse files
committed
resolves aspnetboilerplate/aspnetboilerplate#6238: Use a static value for DefaultPassPhrase in debug mode
1 parent b804552 commit 7f53787

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace AbpCompanyName.AbpProjectName
1+
using AbpCompanyName.AbpProjectName.Debugging;
2+
3+
namespace AbpCompanyName.AbpProjectName
24
{
35
public class AbpProjectNameConsts
46
{
@@ -7,10 +9,12 @@ public class AbpProjectNameConsts
79
public const string ConnectionStringName = "Default";
810

911
public const bool MultiTenancyEnabled = true;
10-
12+
13+
1114
/// <summary>
1215
/// Default pass phrase for SimpleStringCipher decrypt/encrypt operations
1316
/// </summary>
14-
public const string DefaultPassPhrase = "{{DEFAULT_PASS_PHRASE_HERE}}";
17+
public static readonly string DefaultPassPhrase =
18+
DebugHelper.IsDebug ? "gsKxGZ012HLL3MI5" : "{{DEFAULT_PASS_PHRASE_HERE}}";
1519
}
1620
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace AbpCompanyName.AbpProjectName.Debugging
2+
{
3+
public static class DebugHelper
4+
{
5+
public static bool IsDebug
6+
{
7+
get
8+
{
9+
#pragma warning disable
10+
#if DEBUG
11+
return true;
12+
#endif
13+
return false;
14+
#pragma warning restore
15+
}
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)