diff options
author | Girish Ramakrishnan <mail@girish.in> | 2016-09-02 11:33:26 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-09-02 14:33:26 -0400 |
commit | 6c085594e47eeabbe5084a0e5c231af3e18527b6 (patch) | |
tree | ad1eb6b3ad1dc813a574ffb615ca31b328bca451 /model | |
parent | f32eb525f3fa0828a23f589d765c267e3b2aea86 (diff) | |
download | chat-6c085594e47eeabbe5084a0e5c231af3e18527b6.tar.gz chat-6c085594e47eeabbe5084a0e5c231af3e18527b6.tar.bz2 chat-6c085594e47eeabbe5084a0e5c231af3e18527b6.zip |
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
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/model/config.go b/model/config.go index eedd0d116..cb2d100bc 100644 --- a/model/config.go +++ b/model/config.go @@ -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, "") } |