From f15ca06d4c054993c77a566540ef785757c20dea Mon Sep 17 00:00:00 2001 From: Benjamin Morrison Date: Thu, 21 Oct 2021 21:44:31 -0400 Subject: exit if admin password is empty --- svc/conf.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svc/conf.go b/svc/conf.go index 5f826fb..c563efe 100644 --- a/svc/conf.go +++ b/svc/conf.go @@ -177,7 +177,7 @@ func bindConfig() { confObj.CacheInterval = viper.GetDuration("StatusFetchInterval") confObj.DBInterval = viper.GetDuration("DatabasePushInterval") txtPass := viper.GetString("AdminPassword") - if txtPass == "please_change_me" { + if txtPass == "please_change_me" || strings.TrimSpace(txtPass) == "" { fmt.Println("Please set AdminPassword in getwtxt.yml") os.Exit(1) } -- cgit 1.4.1-2-gfad0