1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Add compatibility with other Linked Signature algorithms

This commit is contained in:
Chocobozzz 2018-10-23 11:38:48 +02:00
parent b83b8dd5ae
commit df66d81583
No known key found for this signature in database
GPG key ID: 583A612D890159BE
28 changed files with 1012 additions and 22 deletions

View file

@ -53,7 +53,8 @@ function executeIfActivityPub (fun: RequestHandler | RequestHandler[]) {
export {
checkSignature,
executeIfActivityPub
executeIfActivityPub,
checkHttpSignature
}
// ---------------------------------------------------------------------------
@ -94,7 +95,7 @@ async function checkHttpSignature (req: Request, res: Response) {
async function checkJsonLDSignature (req: Request, res: Response) {
const signatureObject: ActivityPubSignature = req.body.signature
if (!signatureObject.creator) {
if (!signatureObject || !signatureObject.creator) {
res.sendStatus(403)
return false
}