summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/license.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/license.go b/utils/license.go
index 7594e33af..4fba94d4d 100644
--- a/utils/license.go
+++ b/utils/license.go
@@ -55,6 +55,7 @@ func LoadLicense() {
if success, licenseStr := ValidateLicense(buf.Bytes()); success {
license := model.LicenseFromJson(strings.NewReader(licenseStr))
SetLicense(license)
+ return
}
l4g.Warn("No valid enterprise license found")
@@ -105,7 +106,7 @@ func ValidateLicense(signed []byte) (bool, string) {
}
// remove null terminator
- if decoded[len(decoded)-1] == byte(0) {
+ for decoded[len(decoded)-1] == byte(0) {
decoded = decoded[:len(decoded)-1]
}