fix: PostPubkeyChallenge should be lowercasing the pubkey for consistency

This commit is contained in:
Derrick Hammer 2023-06-06 22:28:08 -04:00
parent 36745bb55b
commit d680f0660f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -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 {