From bd57047931a31af91f369bfa24daffe8053688a1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 21 Feb 2018 00:21:49 -0700 Subject: [PATCH] Update exec.php --- app/exec/exec.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/exec/exec.php b/app/exec/exec.php index eaebbc9007..101330587d 100644 --- a/app/exec/exec.php +++ b/app/exec/exec.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - 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"; -?> \ No newline at end of file +?>