From 839f1ad444849db1dd18c9da0c3b7380b355a047 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 25 Aug 2016 04:32:44 -0800 Subject: Fixing license (#3878) * Fixing sanitize license * Fixing license * Fixing unit tests --- utils/license.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'utils/license.go') diff --git a/utils/license.go b/utils/license.go index f0a91665e..4d6387788 100644 --- a/utils/license.go +++ b/utils/license.go @@ -141,17 +141,23 @@ func getClientLicense(l *model.License) map[string]string { return props } -func GetClientLicenseEtag() string { +func GetClientLicenseEtag(useSanitized bool) string { value := "" - for k, v := range ClientLicense { + lic := ClientLicense + + if useSanitized { + lic = GetSanitizedClientLicense() + } + + for k, v := range lic { value += fmt.Sprintf("%s:%s;", k, v) } return model.Etag(fmt.Sprintf("%x", md5.Sum([]byte(value)))) } -func GetSantizedClientLicense() map[string]string { +func GetSanitizedClientLicense() map[string]string { sanitizedLicense := make(map[string]string) for k, v := range ClientLicense { -- cgit v1.2.3-1-g7c22