Skip to content

Commit aae2007

Browse files
fix: Revise the contents of the warning.
1 parent 2c01902 commit aae2007

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

internal/appconfig/appconfig.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ type ConsentConfig struct {
9191
}
9292

9393
type EmailConfig struct {
94-
IMAP IMAPConfig `koanf:"imap"`
95-
SMTP SMTPConfig `koanf:"smtp"`
96-
MimeType string `koanf:"mime_type"`
97-
Security SecurityConfig `koanf:"security"`
94+
IMAP IMAPConfig `koanf:"imap"`
95+
SMTP SMTPConfig `koanf:"smtp"`
96+
MimeType string `koanf:"mime_type"`
97+
Security SecurityConfig `koanf:"security"`
9898
}
9999

100100
type IMAPConfig struct {
@@ -167,8 +167,8 @@ func DefaultConfig() *AppConfig {
167167
},
168168
MimeType: "text/plain",
169169
Security: SecurityConfig{
170-
IgnoreTLSErrors: false, // TLS verification enforced by default
171-
AllowUnsafeHTML: false, // HTML sanitization enforced by default
170+
IgnoreTLSErrors: false, // TLS verification enforced by default
171+
AllowUnsafeHTML: false, // HTML sanitization enforced by default
172172
},
173173
},
174174
}
@@ -209,22 +209,22 @@ func LoadConfig(configPath string) (*AppConfig, error) {
209209
TransformFunc: func(key, value string) (string, interface{}) {
210210
key = strings.ToLower(strings.TrimPrefix(key, EnvPrefix))
211211
key = strings.Replace(key, "_", ".", -1)
212-
212+
213213
aliasMap := map[string]string{
214-
"reporter.org": "reporter.organization.name",
215-
"reporter.org.domain": "reporter.organization.domain",
216-
"reporter.org.email": "reporter.organization.email",
217-
"reporter.email": "reporter.contact.email",
218-
"reporter.name": "reporter.contact.name",
219-
"reporter.phone": "reporter.contact.phone",
220-
"downforce.proxy.url": "network.proxy.url",
221-
"downforce.output.dir": "output.default.directory",
214+
"reporter.org": "reporter.organization.name",
215+
"reporter.org.domain": "reporter.organization.domain",
216+
"reporter.org.email": "reporter.organization.email",
217+
"reporter.email": "reporter.contact.email",
218+
"reporter.name": "reporter.contact.name",
219+
"reporter.phone": "reporter.contact.phone",
220+
"downforce.proxy.url": "network.proxy.url",
221+
"downforce.output.dir": "output.default.directory",
222222
}
223-
223+
224224
if mappedKey, exists := aliasMap[key]; exists {
225225
key = mappedKey
226226
}
227-
227+
228228
return key, value
229229
},
230230
})
@@ -292,7 +292,7 @@ func ValidateConfig(cfg *AppConfig) []error {
292292

293293
// Warn about security options in production
294294
if cfg.Email.Security.IgnoreTLSErrors {
295-
errs = append(errs, fmt.Errorf("SECURITY WARNING: email.security.ignore_tls_errors is enabled - TLS verification is disabled (development only)"))
295+
errs = append(errs, fmt.Errorf("SECURITY WARNING: email.security.ignore_tls_errors is enabled - TLS verification is disabled"))
296296
}
297297
if cfg.Email.Security.AllowUnsafeHTML {
298298
errs = append(errs, fmt.Errorf("SECURITY WARNING: email.security.allow_unsafe_html is enabled - unsafe HTML will be embedded without sanitization (untrusted content at risk)"))

0 commit comments

Comments
 (0)