In order to verify the signature, we need to have the signature.
This commit is contained in:
parent
35c029b124
commit
340244cdab
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue