Refuse production startup when the Heimdall app secret is blank
A missing secret silently switched Discord and Patreon member sign-in off. Outside Development and Testing the validator now fails naming Heimdall:AppSecretFile and Heimdall:AppSecret, never a value. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
920ecb1fbe
commit
1739d5552a
3 changed files with 42 additions and 2 deletions
|
|
@ -105,6 +105,13 @@ public sealed class StartupConfigurationValidator(
|
|||
failures.Add("Heimdall:PatronSupportIntakeSecret is required when patron support intake is enabled.");
|
||||
}
|
||||
|
||||
// The options are already resolved, so a secret from Heimdall:AppSecretFile or Heimdall:AppSecret lands in AppSecret.
|
||||
// Blank would silently switch Discord and Patreon member sign-in off.
|
||||
if (string.IsNullOrWhiteSpace(heimdallOptions.Value.AppSecret))
|
||||
{
|
||||
failures.Add("Heimdall:AppSecretFile (or Heimdall:AppSecret) must supply the Heimdall app secret outside development.");
|
||||
}
|
||||
|
||||
if (stripeOptions.Value.EnableCheckout)
|
||||
{
|
||||
if (!stripeOptions.Value.IsCheckoutConfigured)
|
||||
|
|
|
|||
Loading…
Reference in a new issue