diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js index 95274fae89..5e26329f1f 100644 --- a/src/activitypub/mocks.js +++ b/src/activitypub/mocks.js @@ -201,6 +201,13 @@ Mocks.post = async (objects) => { image = null; } } + if (image) { + const parsed = new URL(image); + if (!mime.getType(parsed.pathname).startsWith('image/')) { + activitypub.helpers.log(`[activitypub/mocks.post] Received image not identified as image due to MIME type: ${image}`); + image = null; + } + } const payload = { uid,