fix: verify the response, not the challenge

This commit is contained in:
Derrick Hammer 2024-01-16 15:37:08 -05:00
parent bc5957f881
commit 6c34b383d7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -297,7 +297,7 @@ func (h *HttpHandler) AccountRegister(jc jape.Context) {
return
}
if !ed25519.Verify(decodedKey[1:], decodedChallenge, decodedSignature) {
if !ed25519.Verify(decodedKey[1:], decodedResponse, decodedSignature) {
errored(errInvalidSignatureErr)
return
}
@ -470,7 +470,7 @@ func (h *HttpHandler) AccountLogin(jc jape.Context) {
return
}
if !ed25519.Verify(decodedKey[1:], decodedChallenge, decodedSignature) {
if !ed25519.Verify(decodedKey[1:], decodedResponse, decodedSignature) {
errored(errInvalidSignatureErr)
return
}