From 61f92517f317f4b3f437b8db48f31c569ceb5f2d Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 9 Oct 2015 12:24:39 -0700 Subject: PLT-586 fixing issues with security alert --- utils/config.go | 2 ++ utils/diagnostic.go | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'utils') 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..7d13e0e52 100644 --- a/utils/diagnostic.go +++ b/utils/diagnostic.go @@ -13,17 +13,18 @@ import ( 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 && model.IsOfficalBuild() { res, err := http.Get(DIAGNOSTIC_URL + "/i?" + values.Encode()) if err != nil { -- cgit v1.2.3-1-g7c22 From ac1367a28607f2f10a1f665838f2e60845062dbf Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 12 Oct 2015 10:57:39 -0700 Subject: Removing offical build check --- utils/diagnostic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/diagnostic.go b/utils/diagnostic.go index 7d13e0e52..fd0c12793 100644 --- a/utils/diagnostic.go +++ b/utils/diagnostic.go @@ -24,7 +24,7 @@ const ( ) func SendDiagnostic(values url.Values) { - if *Cfg.ServiceSettings.EnableSecurityFixAlert && model.IsOfficalBuild() { + if *Cfg.ServiceSettings.EnableSecurityFixAlert { res, err := http.Get(DIAGNOSTIC_URL + "/i?" + values.Encode()) if err != nil { -- cgit v1.2.3-1-g7c22 From dbb1018f20f2730c901a2be9eec127e5a5adb2ed Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 12 Oct 2015 11:35:38 -0700 Subject: Fixing break --- utils/diagnostic.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'utils') diff --git a/utils/diagnostic.go b/utils/diagnostic.go index fd0c12793..8572c2f51 100644 --- a/utils/diagnostic.go +++ b/utils/diagnostic.go @@ -6,8 +6,6 @@ package utils import ( "net/http" "net/url" - - "github.com/mattermost/platform/model" ) const ( -- cgit v1.2.3-1-g7c22