From 1b680dd3995d3e9754aeb4443a0f7c4cedba18a5 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 16 Jan 2024 14:43:26 -0500 Subject: [PATCH] fix: validate without key prefix --- api/s5/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/s5/http.go b/api/s5/http.go index a0063a4..94d9add 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -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 }