PLT-5904 (Server): Config flag for SMTP Cert Check. (#5857)

Этот коммит содержится в:
George Goldberg
2017-03-27 12:43:27 +01:00
коммит произвёл enahum
родитель 01aaccb340
Коммит b489a5bb01
3 изменённых файлов: 32 добавлений и 25 удалений

Просмотреть файл

@@ -231,27 +231,28 @@ type FileSettings struct {
}
type EmailSettings struct {
EnableSignUpWithEmail bool
EnableSignInWithEmail *bool
EnableSignInWithUsername *bool
SendEmailNotifications bool
RequireEmailVerification bool
FeedbackName string
FeedbackEmail string
FeedbackOrganization *string
SMTPUsername string
SMTPPassword string
SMTPServer string
SMTPPort string
ConnectionSecurity string
InviteSalt string
PasswordResetSalt string
SendPushNotifications *bool
PushNotificationServer *string
PushNotificationContents *string
EnableEmailBatching *bool
EmailBatchingBufferSize *int
EmailBatchingInterval *int
EnableSignUpWithEmail bool
EnableSignInWithEmail *bool
EnableSignInWithUsername *bool
SendEmailNotifications bool
RequireEmailVerification bool
FeedbackName string
FeedbackEmail string
FeedbackOrganization *string
SMTPUsername string
SMTPPassword string
SMTPServer string
SMTPPort string
ConnectionSecurity string
InviteSalt string
PasswordResetSalt string
SendPushNotifications *bool
PushNotificationServer *string
PushNotificationContents *string
EnableEmailBatching *bool
EmailBatchingBufferSize *int
EmailBatchingInterval *int
SkipServerCertificateVerification *bool
}
type RateLimitSettings struct {
@@ -680,6 +681,11 @@ func (o *Config) SetDefaults() {
*o.EmailSettings.EmailBatchingInterval = EMAIL_BATCHING_INTERVAL
}
if o.EmailSettings.SkipServerCertificateVerification == nil {
o.EmailSettings.SkipServerCertificateVerification = new(bool)
*o.EmailSettings.SkipServerCertificateVerification = false
}
if !IsSafeLink(o.SupportSettings.TermsOfServiceLink) {
o.SupportSettings.TermsOfServiceLink = nil
}