aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/activitypub/reqsignature.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/activitypub/reqsignature.go')
-rw-r--r--routers/api/v1/activitypub/reqsignature.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/activitypub/reqsignature.go b/routers/api/v1/activitypub/reqsignature.go
index b870d1c0f9..5c0776602b 100644
--- a/routers/api/v1/activitypub/reqsignature.go
+++ b/routers/api/v1/activitypub/reqsignature.go
@@ -41,7 +41,7 @@ func getPublicKeyFromResponse(b []byte, keyID *url.URL) (p crypto.PublicKey, err
return
}
p, err = x509.ParsePKIXPublicKey(block.Bytes)
- return
+ return p, err
}
func fetch(iri *url.URL) (b []byte, err error) {
@@ -59,7 +59,7 @@ func fetch(iri *url.URL) (b []byte, err error) {
return
}
b, err = io.ReadAll(io.LimitReader(resp.Body, setting.Federation.MaxSize))
- return
+ return b, err
}
func verifyHTTPSignatures(ctx *gitea_context.APIContext) (authenticated bool, err error) {
@@ -87,7 +87,7 @@ func verifyHTTPSignatures(ctx *gitea_context.APIContext) (authenticated bool, er
// 3. Verify the other actor's key
algo := httpsig.Algorithm(setting.Federation.Algorithms[0])
authenticated = v.Verify(pubKey, algo) == nil
- return
+ return authenticated, err
}
// ReqHTTPSignature function