From 808ad2a505fea104a16f27184750e16e00aa62d2 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 13 Apr 2023 11:04:35 +0200 Subject: [PATCH] server: HTTP signature requires date header The default of the library used is to require either of the "date" or "x-date" headers. It does not seem sensible to pass on this default. It may be to fix federation with another software but that software should be considered broken, and it does not seem reasonable to potentially get an outdated signature just to fix federation with some buggy software. --- packages/backend/src/server/activitypub.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/activitypub.ts b/packages/backend/src/server/activitypub.ts index 6bec78f8c..9ddda96d9 100644 --- a/packages/backend/src/server/activitypub.ts +++ b/packages/backend/src/server/activitypub.ts @@ -28,7 +28,7 @@ function inbox(ctx: Router.RouterContext): void { let signature; try { - signature = httpSignature.parseRequest(ctx.req, { 'headers': [] }); + signature = httpSignature.parseRequest(ctx.req); } catch (e) { ctx.status = 401; return;