Escape quotes on mkdir (#5463)

* Escape quotes on mkdir

* use better function for argument escaping
This commit is contained in:
agree
2020-09-18 10:01:05 -04:00
committed by GitHub
parent 763945afad
commit b8451c1a84

View File

@@ -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