From 284b16fab5dcf94459091c9c76630ce958434021 Mon Sep 17 00:00:00 2001 From: Patrick Kranzlmueller Date: Thu, 27 Jul 2023 14:18:54 +0200 Subject: [PATCH] improved extension check with js, #411 --- filebrowser/static/filebrowser/js/fileuploader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filebrowser/static/filebrowser/js/fileuploader.js b/filebrowser/static/filebrowser/js/fileuploader.js index 7afbb681b..a6ac73675 100644 --- a/filebrowser/static/filebrowser/js/fileuploader.js +++ b/filebrowser/static/filebrowser/js/fileuploader.js @@ -447,13 +447,13 @@ qq.FileUploaderBasic.prototype = { return name; }, _isAllowedExtension: function(fileName){ - var ext = (-1 !== fileName.indexOf('.')) ? fileName.substr(fileName.lastIndexOf('.')).toLowerCase() : ''; + var fileNameLower = fileName.toLowerCase(); var allowed = this._options.allowedExtensions; if (!allowed.length){return true;} for (var i=0; i