From a33a86ee621d0a1edcfd3fa2e6c7036736a08027 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Wed, 28 Aug 2024 18:28:07 +0200 Subject: [PATCH] Fix bug with "ext" variable passed to .tar.gz mod handler --- src/utils/legacyModWrapper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/legacyModWrapper.js b/src/utils/legacyModWrapper.js index 12994e0..69030fa 100644 --- a/src/utils/legacyModWrapper.js +++ b/src/utils/legacyModWrapper.js @@ -13,7 +13,8 @@ module.exports = (legacyMod) => { let middleware = (req, res, logFacilities, config, next) => { let ext = req.parsedURL.pathname.match(/[^/]\.([^.]+)$/); if (!ext) ext = ""; - + else ext = ext[1].toLowerCase(); + // Function to parse incoming POST data from the request const parsePostData = (options, callback) => { // If the request method is not POST, return a 405 Method Not Allowed error