diff options
author | oliverpool <git@olivier.pfad.fr> | 2024-03-19 16:10:20 +0100 |
---|---|---|
committer | oliverpool <git@olivier.pfad.fr> | 2024-03-24 07:12:31 +0100 |
commit | 7b576d0a5d9f3cae067ff81d6a942b66a4deac3d (patch) | |
tree | 2a0d4fcda2a4f6988f6b70b4cc834e8304d30120 /routers | |
parent | actions artifacts: warn instead of error on invalid request (diff) | |
download | forgejo-7b576d0a5d9f3cae067ff81d6a942b66a4deac3d.tar.xz forgejo-7b576d0a5d9f3cae067ff81d6a942b66a4deac3d.zip |
activitypub: warn instead of error
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/activitypub/reqsignature.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/api/v1/activitypub/reqsignature.go b/routers/api/v1/activitypub/reqsignature.go index 59ebc74b89..6003f664a0 100644 --- a/routers/api/v1/activitypub/reqsignature.go +++ b/routers/api/v1/activitypub/reqsignature.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/activitypub" "code.gitea.io/gitea/modules/httplib" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" gitea_context "code.gitea.io/gitea/services/context" @@ -89,7 +90,8 @@ func verifyHTTPSignatures(ctx *gitea_context.APIContext) (authenticated bool, er func ReqHTTPSignature() func(ctx *gitea_context.APIContext) { return func(ctx *gitea_context.APIContext) { if authenticated, err := verifyHTTPSignatures(ctx); err != nil { - ctx.ServerError("verifyHttpSignatures", err) + log.Warn("verifyHttpSignatures failed: %v", err) + ctx.Error(http.StatusBadRequest, "reqSignature", "request signature verification failed") } else if !authenticated { ctx.Error(http.StatusForbidden, "reqSignature", "request signature verification failed") } |