mail: allow PLAIN auth over non-tls connections (#3900)
This allows mattermost to use a non-tls connection with a SMTP server that supports PLAIN auth (but not LOGIN). The go library explicitly allows PLAIN auth over non-tls connections - https://golang.org/src/net/smtp/auth.go#L55 Fixes #2929
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
f32eb525f3
Коммит
6c085594e4
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
const (
|
||||
CONN_SECURITY_NONE = ""
|
||||
CONN_SECURITY_PLAIN = "PLAIN"
|
||||
CONN_SECURITY_TLS = "TLS"
|
||||
CONN_SECURITY_STARTTLS = "STARTTLS"
|
||||
|
||||
@@ -964,7 +965,7 @@ func (o *Config) IsValid() *AppError {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.file_salt.app_error", nil, "")
|
||||
}
|
||||
|
||||
if !(o.EmailSettings.ConnectionSecurity == CONN_SECURITY_NONE || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_TLS || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_STARTTLS) {
|
||||
if !(o.EmailSettings.ConnectionSecurity == CONN_SECURITY_NONE || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_TLS || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_STARTTLS || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_PLAIN) {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.email_security.app_error", nil, "")
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user