Selaa lähdekoodia

Update exec.php

FusionPBX 7 vuotta sitten
vanhempi
commit
dd00fa8ad8
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6 3
      exec.php

+ 6 - 3
exec.php

@@ -17,7 +17,7 @@
 
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
-	Portions created by the Initial Developer are Copyright (C) 2008-2016
+	Portions created by the Initial Developer are Copyright (C) 2008-2018
 	the Initial Developer. All Rights Reserved.
 
 	Contributor(s):
@@ -461,7 +461,10 @@
 				case 'switch':
 					if (permission_exists('exec_switch')) {
 						$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
-						if ($fp) { $result = htmlentities(event_socket_request($fp, 'api '.$cmd)); }
+						if ($fp) { 
+							$result = event_socket_request($fp, 'api '.$cmd);
+							$result = htmlspecialchars(utf8_encode($result), ENT_QUOTES);
+						}
 					}
 					break;
 			}
@@ -487,4 +490,4 @@
 //show the footer
 	require_once "resources/footer.php";
 
-?>
+?>