fix verification of http-signature in federation msg

This commit is contained in:
les
2019-08-08 17:48:12 +02:00
parent ca83f1c675
commit bb32611e73
3 changed files with 14 additions and 12 deletions

View File

@@ -32,9 +32,6 @@ router.get('/m/:event_id', async (req, res) => {
router.post('/u/:name/inbox', Helpers.verifySignature, async (req, res) => {
const b = req.body
console.error('> INBOX ', b.type, b)
const targetOrigin = new URL(b.actor).origin
const domain = new URL(config.baseurl).host
switch(b.type) {
case 'Follow':
@@ -43,7 +40,7 @@ router.post('/u/:name/inbox', Helpers.verifySignature, async (req, res) => {
case 'Undo':
// unfollow || unlike
if (b.object.type === 'Follow') {
Follows.unfollow(req, res, b, targetOrigin, domain)
Follows.unfollow(req, res)
} else if (b.object.type === 'Like') {
Ego.unbookmark(req, res)
} else if (b.object.type === 'Announce') {