浏览代码

http_destination variables should be encoded

Antonio Fernandez 1 年之前
父节点
当前提交
fdfb7d7e9f
共有 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);