From 231e571c3c309c22a2534a73fe22236667cadb8f Mon Sep 17 00:00:00 2001
From: Stephan Renatus <srenatus@chef.io>
Date: Tue, 30 Jul 2019 14:52:32 +0200
Subject: [PATCH] server/api: fix logging in VerifyPassword

Before:

    msg="api: password check failed : %vcrypto/bcrypt: hashedPassword is not the hash of the given password"

After:

    msg="api: password check failed : crypto/bcrypt: hashedPassword is not the hash of the given password"

Signed-off-by: Stephan Renatus <srenatus@chef.io>
---
 server/api.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/api.go b/server/api.go
index 850ec493..ab47b141 100644
--- a/server/api.go
+++ b/server/api.go
@@ -275,7 +275,7 @@ func (d dexAPI) VerifyPassword(ctx context.Context, req *api.VerifyPasswordReq)
 	}
 
 	if err := bcrypt.CompareHashAndPassword(password.Hash, []byte(req.Password)); err != nil {
-		d.logger.Info("api: password check failed : %v", err)
+		d.logger.Infof("api: password check failed: %v", err)
 		return &api.VerifyPasswordResp{
 			Verified: false,
 		}, nil
-- 
GitLab