fix: validate without key prefix
This commit is contained in:
parent
dd5c6332f3
commit
1b680dd399
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue