From e7053b1d9d7f77d0375155b38d3e845f2163ecd8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Mar 2021 11:17:20 +0100 Subject: Fix AP security tests --- shared/extra-utils/requests/activitypub.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared') diff --git a/shared/extra-utils/requests/activitypub.ts b/shared/extra-utils/requests/activitypub.ts index 2a7f20289..ecd8ce823 100644 --- a/shared/extra-utils/requests/activitypub.ts +++ b/shared/extra-utils/requests/activitypub.ts @@ -17,7 +17,7 @@ function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: async function makeFollowRequest (to: { url: string }, by: { url: string, privateKey }) { const follow = { type: 'Follow', - id: by.url + '/toto', + id: by.url + '/' + new Date().getTime(), actor: by.url, object: to.url } @@ -33,7 +33,7 @@ async function makeFollowRequest (to: { url: string }, by: { url: string, privat } const headers = buildGlobalHeaders(body) - return makePOSTAPRequest(to.url, body, httpSignature, headers) + return makePOSTAPRequest(to.url + '/inbox', body, httpSignature, headers) } export { -- cgit v1.2.3