fix: PostPubkeyChallenge should be lowercasing the pubkey for consistency
This commit is contained in:
parent
36745bb55b
commit
d680f0660f
|
@ -13,6 +13,7 @@ import (
|
||||||
"github.com/kataras/jwt"
|
"github.com/kataras/jwt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -201,6 +202,8 @@ func (a *AuthController) PostPubkeyChallenge() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r.Pubkey = strings.ToLower(r.Pubkey)
|
||||||
|
|
||||||
// Retrieve the account for the given email.
|
// Retrieve the account for the given email.
|
||||||
account := model.Key{}
|
account := model.Key{}
|
||||||
if err := db.Get().Where("pubkey = ?", r.Pubkey).First(&account).Error; err != nil {
|
if err := db.Get().Where("pubkey = ?", r.Pubkey).First(&account).Error; err != nil {
|
||||||
|
|
Loading…
Reference in New Issue