From ec987b1a7581db267178a91e1534b39bbdef5d20 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Mon, 29 Jul 2019 13:48:40 -0300 Subject: [PATCH] [FIX] Empty white list enables all media types upload (#1077) --- app/containers/MessageBox/UploadModal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/containers/MessageBox/UploadModal.js b/app/containers/MessageBox/UploadModal.js index 4a5baa3c..6616ccc0 100644 --- a/app/containers/MessageBox/UploadModal.js +++ b/app/containers/MessageBox/UploadModal.js @@ -166,8 +166,9 @@ export default class UploadModal extends Component { if (file.size > FileUpload_MaxFileSize) { return false; } + // if white list is empty, all media types are enabled if (!FileUpload_MediaTypeWhiteList) { - return false; + return true; } const allowedMime = FileUpload_MediaTypeWhiteList.split(','); if (allowedMime.includes(file.mime)) {