fix: validate without key prefix

This commit is contained in:
Derrick Hammer 2024-01-16 14:43:26 -05:00
parent dd5c6332f3
commit 1b680dd399
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, decodedChallenge, decodedSignature) {
if !ed25519.Verify(decodedKey[1:], decodedChallenge, decodedSignature) {
errored(errInvalidSignatureErr)
return
}
@ -468,7 +468,7 @@ func (h *HttpHandler) AccountLogin(jc jape.Context) {
return
}
if !ed25519.Verify(decodedKey, decodedChallenge, decodedSignature) {
if !ed25519.Verify(decodedKey[1:], decodedChallenge, decodedSignature) {
errored(errInvalidSignatureErr)
return
}