From 340244cdab68c41eaa239e4a7ac48df05810df40 Mon Sep 17 00:00:00 2001 From: Andrew Pietila Date: Tue, 11 Apr 2023 23:24:37 -0500 Subject: [PATCH] In order to verify the signature, we need to have the signature. --- routes/inbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/inbox.js b/routes/inbox.js index 5a0a48c..8790f69 100644 --- a/routes/inbox.js +++ b/routes/inbox.js @@ -35,7 +35,7 @@ module.exports = { } }).join('\n'); // ... then lets dump this in the queue for now. - await db("queue").insert({task: "verify_inbox", data: JSON.stringify({signed_block, body: req.body, date: (new Date()).toISOString()})}); + await db("queue").insert({task: "verify_inbox", data: JSON.stringify({sig_header: req.header("signature"), signed_block, body: req.body, date: (new Date()).toISOString()})}); res.status(204); return res.end(); } @@ -44,7 +44,7 @@ module.exports = { if ( !take_at_face_value ) { // 2. If the signature is not valid, or non-existant, then we fetch the resource manually. var bodyParsed = await jsonld.compact(req.body, 'https://www.w3.org/ns/activitystreams'); - await db("queue").insert({task: "fetch_object", data: JSON.stringify({id: bodyParsed.id})}); + await db("queue").insert({task: "fetch_object", data: bodyParsed.id}); res.status(204); return res.end(); }