From 2eeca0112cb2e6a5d470f9f5c20125f3d31c96bb Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Sun, 23 Jun 2024 20:02:53 +0200 Subject: [PATCH] fix: allow automatic uploads and uppercase file extensions, closes #3018 --- phpmyfaq/admin/assets/src/content/editor.js | 2 +- phpmyfaq/admin/media.browser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpmyfaq/admin/assets/src/content/editor.js b/phpmyfaq/admin/assets/src/content/editor.js index 0f23d6952d..5b12090824 100644 --- a/phpmyfaq/admin/assets/src/content/editor.js +++ b/phpmyfaq/admin/assets/src/content/editor.js @@ -234,7 +234,7 @@ export const renderEditor = () => { ], image_dimensions: true, images_upload_url: 'index.php?action=ajax&ajax=image&ajaxaction=upload', - automatic_uploads: false, + automatic_uploads: true, }); } }; diff --git a/phpmyfaq/admin/media.browser.php b/phpmyfaq/admin/media.browser.php index 8c991c1b52..aaa6e75c97 100644 --- a/phpmyfaq/admin/media.browser.php +++ b/phpmyfaq/admin/media.browser.php @@ -87,7 +87,7 @@ } else { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(PMF_ROOT_DIR . '/images/')); foreach ($files as $file) { - if ($file->isDir() || !in_array($file->getExtension(), $allowedExtensions)) { + if ($file->isDir() || !in_array(strtolower($file->getExtension()), $allowedExtensions)) { continue; } $path = str_replace(dirname(__DIR__) . '/', '', (string) $file->getPath());