From d680f0660f910e323356a1169ee13ef2e647a015 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 6 Jun 2023 22:28:08 -0400 Subject: [PATCH] fix: PostPubkeyChallenge should be lowercasing the pubkey for consistency --- controller/auth.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller/auth.go b/controller/auth.go index e86d823..3f5472b 100644 --- a/controller/auth.go +++ b/controller/auth.go @@ -13,6 +13,7 @@ import ( "github.com/kataras/jwt" "go.uber.org/zap" "golang.org/x/crypto/bcrypt" + "strings" "time" ) @@ -201,6 +202,8 @@ func (a *AuthController) PostPubkeyChallenge() { return } + r.Pubkey = strings.ToLower(r.Pubkey) + // Retrieve the account for the given email. account := model.Key{} if err := db.Get().Where("pubkey = ?", r.Pubkey).First(&account).Error; err != nil {