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:
parent
90259527cc
commit
28695de14c
|
|
@ -4,7 +4,7 @@
|
||||||
dir = dir:gsub([[\]], "/");
|
dir = dir:gsub([[\]], "/");
|
||||||
|
|
||||||
--retrieve allowed characters and then use it to sanitize the dir variable
|
--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 .. "]", "")
|
dir = dir:gsub("[^" .. allowed_chars .. "]", "")
|
||||||
|
|
||||||
if (package.config:sub(1,1) == "/") then
|
if (package.config:sub(1,1) == "/") then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue