From 5d26376460e11ff79ddb1fe89f7995de3bc931f9 Mon Sep 17 00:00:00 2001 From: Richie Yeung Date: Fri, 13 Jul 2018 20:35:06 +0100 Subject: [PATCH] Fix empty string check for password (#4923) --- physical/mysql/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physical/mysql/mysql.go b/physical/mysql/mysql.go index 1fc5bfdcff..af99382aed 100644 --- a/physical/mysql/mysql.go +++ b/physical/mysql/mysql.go @@ -50,7 +50,7 @@ func NewMySQLBackend(conf map[string]string, logger log.Logger) (physical.Backen return nil, fmt.Errorf("missing username") } password, ok := conf["password"] - if !ok || username == "" { + if !ok || password == "" { return nil, fmt.Errorf("missing password") }