From fe9371f06cd590d2d9960ec30be1126eee9da88f Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 11 Dec 2019 23:14:51 +0900 Subject: [PATCH] =?UTF-8?q?AP=20Signature=E3=83=98=E3=83=83=E3=83=80?= =?UTF-8?q?=E3=81=AE=E7=89=B9=E6=AE=8A=E5=87=A6=E7=90=86=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4=20(#5628)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote/activitypub/request.ts | 5 ----- src/server/activitypub.ts | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/remote/activitypub/request.ts b/src/remote/activitypub/request.ts index e4f301833..bcbb0fbe7 100644 --- a/src/remote/activitypub/request.ts +++ b/src/remote/activitypub/request.ts @@ -60,11 +60,6 @@ export default async (user: ILocalUser, url: string, object: any) => { headers: ['date', 'host', 'digest'] }); - // Signature: Signature ... => Signature: ... - let sig = req.getHeader('Signature')!.toString(); - sig = sig.replace(/^Signature /, ''); - req.setHeader('Signature', sig); - req.on('timeout', () => req.abort()); req.on('error', e => { diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts index 92e23380c..3094d69b1 100644 --- a/src/server/activitypub.ts +++ b/src/server/activitypub.ts @@ -26,8 +26,6 @@ const router = new Router(); function inbox(ctx: Router.RouterContext) { let signature; - ctx.req.headers.authorization = `Signature ${ctx.req.headers.signature}`; - try { signature = httpSignature.parseRequest(ctx.req, { 'headers': [] }); } catch (e) {