summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-02-11 10:51:49 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-02 12:32:36 +0200
commit026dda93fadd24d94d4330de82d063ab819118c7 (patch)
treec3fcd1071f2ce0a20dbeae1ff221e791f902a89e /admin/WebConsole
parent77c09c6b7d6f4d613c7d550d727466d2d11ff3bd (diff)
#942 Fix run script encoding (web)
Run script commands should not be encoded as an URL.
Diffstat (limited to 'admin/WebConsole')
-rw-r--r--admin/WebConsole/includes/restfunctions.php3
1 files changed, 2 insertions, 1 deletions
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);