about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenjamin Morrison <ben@gbmor.dev>2021-10-21 21:44:31 -0400
committerBenjamin Morrison <ben@gbmor.dev>2021-10-21 21:44:31 -0400
commitf15ca06d4c054993c77a566540ef785757c20dea (patch)
tree7d6cc84b1b2119aff64bfc4ccad9b0ee0f66c3d4
parent57dfee62f097eed8f5e4a3429d7ea850ce07c570 (diff)
downloadgetwtxt-f15ca06d4c054993c77a566540ef785757c20dea.tar.gz
exit if admin password is empty
-rw-r--r--svc/conf.go2
1 files changed, 1 insertions, 1 deletions
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)
 	}