From 9ee1fb490ef8af10a55dca4423942ed588db2ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 23 Nov 2020 11:18:42 -0500 Subject: [PATCH] fix: https://github.com/NodeBB/NodeBB/pull/8759 --- src/controllers/uploads.js | 1 + src/topics/thumb.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 709eed54ea..df1f930401 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -117,6 +117,7 @@ uploadsController.uploadThumb = async function (req, res, next) { throw new Error('[[error:invalid-file]]'); } await image.isFileTypeAllowed(uploadedFile.path); + await image.checkDimensions(uploadedFile.path); await image.resizeImage({ path: uploadedFile.path, width: meta.config.topicThumbSize, diff --git a/src/topics/thumb.js b/src/topics/thumb.js index 3988fd5440..f32c4fa96d 100644 --- a/src/topics/thumb.js +++ b/src/topics/thumb.js @@ -47,6 +47,7 @@ module.exports = function (Topics) { await image.isFileTypeAllowed(pathToUpload); + await image.checkDimensions(pathToUpload); await image.resizeImage({ path: pathToUpload, width: meta.config.topicThumbSize,