mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fix: logic error in image mime type checking
This commit is contained in:
@@ -104,7 +104,7 @@ Mocks._normalize = async (object) => {
|
|||||||
if (image) {
|
if (image) {
|
||||||
const parsed = new URL(image);
|
const parsed = new URL(image);
|
||||||
const type = mime.getType(parsed.pathname);
|
const type = mime.getType(parsed.pathname);
|
||||||
if (!type || type.startsWith('image/')) {
|
if (!type || !type.startsWith('image/')) {
|
||||||
activitypub.helpers.log(`[activitypub/mocks.post] Received image not identified as image due to MIME type: ${image}`);
|
activitypub.helpers.log(`[activitypub/mocks.post] Received image not identified as image due to MIME type: ${image}`);
|
||||||
image = null;
|
image = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user