From 28695de14cfdd1444a2ba929ae041cc18f8afada Mon Sep 17 00:00:00 2001 From: jacobbuscher-bt <111894981+jacobbuscher-bt@users.noreply.github.com> Date: Wed, 12 Jul 2023 22:15:37 -0600 Subject: [PATCH] Add the / character to the ALLOWED_CHARS variable to fix bug with front slashes being stripped. Previously was turning /var/lib/freeswitch into varlibfreeswitch (#6773) Co-authored-by: Jacob Buscher --- app/switch/resources/scripts/resources/functions/mkdir.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/switch/resources/scripts/resources/functions/mkdir.lua b/app/switch/resources/scripts/resources/functions/mkdir.lua index a0a55f38b1..ee52bf8996 100644 --- a/app/switch/resources/scripts/resources/functions/mkdir.lua +++ b/app/switch/resources/scripts/resources/functions/mkdir.lua @@ -4,7 +4,7 @@ dir = dir:gsub([[\]], "/"); --retrieve allowed characters and then use it to sanitize the dir variable - local allowed_chars = os.getenv("ALLOWED_CHARS") or "^%a%d%-%._~" + local allowed_chars = os.getenv("ALLOWED_CHARS") or "^%a%d%-%._~/" dir = dir:gsub("[^" .. allowed_chars .. "]", "") if (package.config:sub(1,1) == "/") then