소스 검색

Escape quotes on mkdir (#5463)

* Escape quotes on mkdir

* use better function for argument escaping
agree 5 년 전
부모
커밋
19a49c69a8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      resources/functions.php

+ 1 - 1
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