diff --git a/install/package.json b/install/package.json index d0ab4d0d34..b0ef7ebf50 100644 --- a/install/package.json +++ b/install/package.json @@ -96,7 +96,7 @@ "mousetrap": "1.6.5", "multer": "2.0.2", "nconf": "0.13.0", - "nodebb-plugin-2factor": "7.5.10", + "nodebb-plugin-2factor": "7.6.0", "nodebb-plugin-composer-default": "10.3.1", "nodebb-plugin-dbsearch": "6.3.2", "nodebb-plugin-emoji": "6.0.3", @@ -202,4 +202,4 @@ "url": "https://github.com/barisusakli" } ] -} \ No newline at end of file +} diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js index c1caacd698..9b5f85db69 100644 --- a/src/activitypub/inbox.js +++ b/src/activitypub/inbox.js @@ -302,6 +302,7 @@ inbox.announce = async (req) => { const exists = await posts.exists(localId || id); if (exists) { try { + await activitypub.actors.assert(object.actor); const result = await posts.upvote(localId || id, object.actor); if (localId) { socketHelpers.upvote(result, 'notifications:upvoted-your-post-in'); diff --git a/src/database/postgres/main.js b/src/database/postgres/main.js index c0838b45a0..5b3c7f7e9d 100644 --- a/src/database/postgres/main.js +++ b/src/database/postgres/main.js @@ -85,7 +85,8 @@ module.exports = function (module) { text: ` SELECT o."_key" FROM "legacy_object_live" o - WHERE o."_key" LIKE '${match}'`, + WHERE o."_key" LIKE $1`, + values: [match], }); return res.rows.map(r => r._key);