diff --git a/controllers/uploadController.js b/controllers/uploadController.js index 8e05dd3..31a160e 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -551,8 +551,8 @@ self.actuallyUploadUrls = async (req, res, data = {}) => { } const urls = req.body.urls - if (!urls || !(urls instanceof Array)) { - throw new ClientError('Missing "urls" property (array).') + if (!Array.isArray(urls) || !urls.length || urls.some(url => !/^https?:\/\//.test(url))) { + throw new ClientError('Bad request.') } if (urls.length > maxFilesPerUpload) {