mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
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 <jacob@bfitec.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user