Node.js based forum software built for the modern web
fix: handle cases where url passed to mime does not pass because url contained a query string
Julian Lam5baa46d0bcb3
diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.jsindex 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,