From 8a3c58d3b520b5774d29bd677d71028634fb3c1b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 30 May 2019 01:31:01 -0600 Subject: [PATCH] Update exec.php --- app/exec/exec.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/exec/exec.php b/app/exec/exec.php index ac5a09b5cf..1ba46ed318 100644 --- a/app/exec/exec.php +++ b/app/exec/exec.php @@ -264,7 +264,7 @@ $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $row = array_values($row); - echo " \n"; + echo " \n"; } echo " \n"; //echo "

\n"; @@ -296,7 +296,7 @@ echo "
"; //html form - echo "\n"; //sql db id + echo "\n"; //sql db id echo ""; echo "\n"; echo " "; @@ -342,7 +342,7 @@ $preview = "onmouseover=\"editor.getSession().setMode(".(($value == 'php') ? "{path:'ace/mode/php', inline:true}" : "'ace/mode/' + this.value").");\""; } $selected = ($value == $mode) ? 'selected' : null; - echo "\n"; + echo "\n"; } ?> @@ -353,12 +353,12 @@ $sizes = explode(',','9px,10px,11px,12px,14px,16px,18px,20px'); $preview = ($setting_preview == 'true') ? "onmouseover=\"document.getElementById('editor').style.fontSize = this.value;\"" : null; if (!in_array($setting_size, $sizes)) { - echo "\n"; + echo "\n"; echo "\n"; } foreach ($sizes as $size) { $selected = ($size == $setting_size) ? 'selected' : null; - echo "\n"; + echo "\n"; } ?> @@ -405,7 +405,7 @@ echo "\n"; foreach ($theme as $value => $label) { $selected = (strtolower($label) == strtolower($setting_theme)) ? 'selected' : null; - echo "\n"; + echo "\n"; } echo "\n"; } @@ -414,7 +414,7 @@
-
+
"; @@ -446,7 +446,7 @@ editor.getSession().setMode({path:'ace/mode/php', inline:true}); - document.getElementById('editor').style.fontSize=''; + document.getElementById('editor').style.fontSize=''; focus_editor(); //keyboard shortcut to execute command @@ -467,7 +467,7 @@ switch ($handler) { case 'shell': if (permission_exists('exec_command') && $command_authorized) { - $result = htmlentities(shell_exec($command . " 2>&1")); + $result = escape(shell_exec($command . " 2>&1")); } break; case 'php': @@ -492,7 +492,7 @@ echo ""; echo "".$text['label-response']."\n"; echo "

\n"; - echo ($handler == 'switch') ? "\n" : "
".$result."
"; + echo ($handler == 'switch') ? "\n" : "
".escape($result)."
"; echo "
"; } }