소스 검색

Merge pull request #5 from tony1661/patch-2

http_destination variables should be encoded
FusionPBX 1 년 전
부모
커밋
4066e0010d
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      resources/service/message_send_outbound.php

+ 5 - 5
resources/service/message_send_outbound.php

@@ -365,11 +365,11 @@
 	}
 	}
 
 
 //exchange variable name with their values
 //exchange variable name with their values
-	$setting['http_destination'] = str_replace("\${from}", $message_from, $setting['http_destination']);
-	$setting['http_destination'] = str_replace("\${message_from}", $message_from, $setting['http_destination']);
-	$setting['http_destination'] = str_replace("\${to}", $message_to, $setting['http_destination']);
-	$setting['http_destination'] = str_replace("\${message_to}", $message_to, $setting['http_destination']);
-	$setting['http_destination'] = str_replace("\${message_text}", $message_text, $setting['http_destination']);
+	$setting['http_destination'] = str_replace("\${from}", urlencode($message_from), $setting['http_destination']);
+	$setting['http_destination'] = str_replace("\${message_from}", urlencode($message_from), $setting['http_destination']);
+	$setting['http_destination'] = str_replace("\${to}", urlencode($message_to), $setting['http_destination']);
+	$setting['http_destination'] = str_replace("\${message_to}", urlencode($message_to), $setting['http_destination']);
+	$setting['http_destination'] = str_replace("\${message_text}", urlencode($message_text), $setting['http_destination']);
 
 
 //logging info
 //logging info
 	//view_array($setting, false);
 	//view_array($setting, false);