From 19a9ac113d0d66dcbfd59425e00df083c16dfdc0 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Tue, 11 Feb 2020 10:51:49 +0100 Subject: #942 Fix run script encoding (web) Run script commands should not be encoded as an URL. --- admin/WebConsole/includes/restfunctions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index 828a2bef..274ca708 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -117,7 +117,8 @@ function shell($case, $string_ips, $command) { switch ($case) { case 3: - $command = substr($command, 4); + $decoded_cmds = rawurldecode(substr($command, 4)); + $command = substr($decoded_cmds, 0, -2); $data = array(OG_REST_PARAM_CLIENTS => $ips, OG_REST_PARAM_RUN => $command, OG_REST_PARAM_ECHO => false); -- cgit v1.2.3-18-g5258