fix: PostPubkeyLogin should be lowercasing the pubkey and signature

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

View File

@ -236,6 +236,9 @@ func (a *AuthController) PostPubkeyLogin() {
return
}
r.Pubkey = strings.ToLower(r.Pubkey)
r.Signature = strings.ToLower(r.Signature)
// Retrieve the key challenge for the given challenge.
challenge := model.KeyChallenge{}
if err := db.Get().Where("challenge = ?", r.Challenge).Preload("Key").First(&challenge).Error; err != nil {