diff options
author | Corey Hulen <corey@hulen.com> | 2015-10-12 13:56:21 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-10-12 13:56:21 -0700 |
commit | a6a3c351a828441313e90c1ac8e6afbfadad1f7c (patch) | |
tree | e7d41a6789d421d8cbcbbb1417edf74810ac3672 /utils | |
parent | 7a469c8fc19694a2d6afd2bd420ba6fd3a9a0d93 (diff) | |
parent | 9f83a72f7330857e06095403c1cf5402bef455d6 (diff) | |
download | chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.tar.gz chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.tar.bz2 chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.zip |
Merge pull request #997 from mattermost/PLT-586
PLT-586 fixing issues with security alert
Diffstat (limited to 'utils')
-rw-r--r-- | utils/config.go | 2 | ||||
-rw-r--r-- | utils/diagnostic.go | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/utils/config.go b/utils/config.go index 44ee14a6e..2c6f30bf0 100644 --- a/utils/config.go +++ b/utils/config.go @@ -150,6 +150,8 @@ func LoadConfig(fileName string) { CfgFileName = fileName } + config.SetDefaults() + if err := config.IsValid(); err != nil { panic("Error validating config file=" + fileName + ", err=" + err.Message) } diff --git a/utils/diagnostic.go b/utils/diagnostic.go index da02e771b..8572c2f51 100644 --- a/utils/diagnostic.go +++ b/utils/diagnostic.go @@ -6,24 +6,23 @@ package utils import ( "net/http" "net/url" - - "github.com/mattermost/platform/model" ) const ( DIAGNOSTIC_URL = "https://d7zmvsa9e04kk.cloudfront.net" - PROP_DIAGNOSTIC_ID = "id" - PROP_DIAGNOSTIC_CATEGORY = "c" - VAL_DIAGNOSTIC_CATEGORY_DEFAULT = "d" - PROP_DIAGNOSTIC_BUILD = "b" - PROP_DIAGNOSTIC_DATABASE = "db" - PROP_DIAGNOSTIC_OS = "os" - PROP_DIAGNOSTIC_USER_COUNT = "uc" + PROP_DIAGNOSTIC_ID = "id" + PROP_DIAGNOSTIC_CATEGORY = "c" + VAL_DIAGNOSTIC_CATEGORY_DEFAULT = "d" + PROP_DIAGNOSTIC_BUILD = "b" + PROP_DIAGNOSTIC_DATABASE = "db" + PROP_DIAGNOSTIC_OS = "os" + PROP_DIAGNOSTIC_USER_COUNT = "uc" + PROP_DIAGNOSTIC_ACTIVE_USER_COUNT = "auc" ) func SendDiagnostic(values url.Values) { - if Cfg.PrivacySettings.EnableSecurityFixAlert && model.IsOfficalBuild() { + if *Cfg.ServiceSettings.EnableSecurityFixAlert { res, err := http.Get(DIAGNOSTIC_URL + "/i?" + values.Encode()) if err != nil { |