Skip to content

Commit

Permalink
Reenforce lowercase bool config strings
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Jul 22, 2024
1 parent fac46f2 commit 1677530
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Backend/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void ConfigureServices(IServiceCollection services)

options.CaptchaEnabled = bool.Parse(CheckedEnvironmentVariable(
"COMBINE_CAPTCHA_REQUIRED",
bool.TrueString,
"true",
"CAPTCHA should be explicitly required or not required.")!);
if (options.CaptchaEnabled)
{
Expand All @@ -185,7 +185,7 @@ public void ConfigureServices(IServiceCollection services)
const string emailServiceFailureMessage = "Email services will not work.";
options.EmailEnabled = bool.Parse(CheckedEnvironmentVariable(
"COMBINE_EMAIL_ENABLED",
bool.FalseString,
"false",
emailServiceFailureMessage,
true)!);
if (options.EmailEnabled)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ A rapid word collection tool. See the [User Guide](https://sillsdev.github.io/Th
SMTP values must be kept secret, so ask your email administrator to supply them. Set them in your `.profile` (Linux
or Mac 10.14-), your `.zprofile` (Mac 10.15+), or the _System_ app (Windows).

- `COMBINE_EMAIL_ENABLED=True`
- `COMBINE_EMAIL_ENABLED=true`
- `COMBINE_SMTP_SERVER`
- `COMBINE_SMTP_PORT`
- `COMBINE_SMTP_USERNAME`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
name: env-backend
namespace: {{ .Release.Namespace }}
data:
COMBINE_CAPTCHA_REQUIRED: {{ .Values.global.captchaRequired | quote }}
COMBINE_CAPTCHA_REQUIRED: {{ .Values.global.captchaRequired | quote | toLower }}
COMBINE_CAPTCHA_VERIFY_URL: {{ .Values.captchaVerifyUrl | quote }}
COMBINE_EMAIL_ENABLED: {{ .Values.global.emailEnabled | quote }}
COMBINE_EMAIL_ENABLED: {{ .Values.global.emailEnabled | quote | toLower }}
COMBINE_PASSWORD_RESET_EXPIRE_TIME:
{{ .Values.combinePasswordResetTime | quote }}
COMBINE_SMTP_ADDRESS: {{ .Values.combineSmtpAddress | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ data:
SERVER_NAME: {{ .Values.global.serverName }}
CERT_ADDL_DOMAINS: {{ .Values.combineAddlDomainList | quote }}
CONFIG_USE_CONNECTION_URL: "true"
CONFIG_CAPTCHA_REQUIRED: {{ .Values.global.captchaRequired | quote }}
CONFIG_CAPTCHA_REQUIRED: {{ .Values.global.captchaRequired | quote | toLower }}
CONFIG_CAPTCHA_SITE_KEY: {{ .Values.configCaptchaSiteKey | quote }}
CONFIG_OFFLINE: {{ .Values.configOffline | quote }}
CONFIG_EMAIL_ENABLED: {{ .Values.global.emailEnabled | quote }}
CONFIG_SHOW_CERT_EXPIRATION: {{ .Values.configShowCertExpiration | quote }}
CONFIG_OFFLINE: {{ .Values.configOffline | quote | toLower }}
CONFIG_EMAIL_ENABLED: {{ .Values.global.emailEnabled | quote | toLower }}
CONFIG_SHOW_CERT_EXPIRATION: {{ .Values.configShowCertExpiration | quote | toLower }}
{{- if .Values.configAnalyticsWriteKey }}
CONFIG_ANALYTICS_WRITE_KEY: {{ .Values.configAnalyticsWriteKey | quote }}
{{- end }}

0 comments on commit 1677530

Please sign in to comment.