From e26b77faf10c6ca18f12df573d36d4e4676ffcf9 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 5 Oct 2015 17:33:45 -0700 Subject: PLT-518 check for security bulletins --- utils/diagnostic.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'utils') diff --git a/utils/diagnostic.go b/utils/diagnostic.go index 9a61ae934..8ff2922f4 100644 --- a/utils/diagnostic.go +++ b/utils/diagnostic.go @@ -6,12 +6,12 @@ package utils import ( "net/http" - l4g "code.google.com/p/log4go" - "github.com/mattermost/platform/model" ) const ( + DIAGNOSTIC_URL = "https://d7zmvsa9e04kk.cloudfront.net" + PROP_DIAGNOSTIC_ID = "id" PROP_DIAGNOSTIC_CATEGORY = "c" VAL_DIAGNOSTIC_CATEGORY_DEFALUT = "d" @@ -21,8 +21,8 @@ const ( PROP_DIAGNOSTIC_USER_COUNT = "uc" ) -func SendDiagnostic(data model.StringMap) *model.AppError { - if Cfg.PrivacySettings.EnableDiagnostic && !model.IsOfficalBuild() { +func SendDiagnostic(data model.StringMap) { + if Cfg.PrivacySettings.EnableSecurityFixAlert && model.IsOfficalBuild() { query := "?" for name, value := range data { @@ -33,13 +33,11 @@ func SendDiagnostic(data model.StringMap) *model.AppError { query += name + "=" + UrlEncode(value) } - res, err := http.Get("http://d7zmvsa9e04kk.cloudfront.net/i" + query) + res, err := http.Get(DIAGNOSTIC_URL + "/i" + query) if err != nil { - l4g.Error("Failed to send diagnostics %v", err.Error()) + return } res.Body.Close() } - - return nil } -- cgit v1.2.3-1-g7c22