From b8451c1a84e2fb7d185a8f00d52992d874468537 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Fri, 18 Sep 2020 10:01:05 -0400 Subject: [PATCH] Escape quotes on mkdir (#5463) * Escape quotes on mkdir * use better function for argument escaping --- resources/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index 1f71d7316f..9203a49788 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1923,7 +1923,7 @@ function number_pad($number,$n) { //send the mkdir command to freeswitch if ($fp) { //build and send the mkdir command to freeswitch - $switch_cmd = "lua mkdir.lua '$dir'"; + $switch_cmd = "lua mkdir.lua ".escapeshellarg($dir); $switch_result = event_socket_request($fp, 'api '.$switch_cmd); fclose($fp); //check result