summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/comandos
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-01-09 12:27:19 +0000
committerramon <ramongomez@us.es>2017-01-09 12:27:19 +0000
commite46f7ceb735aee2920cfa64f9933b19294e6c915 (patch)
tree29a14eaf37d39f7f812901e9616ae01c844c4b12 /admin/WebConsole/comandos
parent9f9a3b8cf5b1395e82be4fcad32504bf24bd9357 (diff)
#718: Servidor OpenGnsys envĂ­a token de seguridad a OGAgent en cabecera HTTP.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5138 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/comandos')
-rw-r--r--admin/WebConsole/comandos/gestores/gestor_Comandos.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/admin/WebConsole/comandos/gestores/gestor_Comandos.php b/admin/WebConsole/comandos/gestores/gestor_Comandos.php
index 56b8ee89..32bb6ae0 100644
--- a/admin/WebConsole/comandos/gestores/gestor_Comandos.php
+++ b/admin/WebConsole/comandos/gestores/gestor_Comandos.php
@@ -167,7 +167,7 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){
}
else{
$ValorParametros=extrae_parametros($parametros,chr(13),'=');
- $script=$ValorParametros["scp"];
+ $script=urldecode($ValorParametros["scp"]);
if($sw_ejya=='on'){
// Envio al servidor
$shidra=new SockHidra($servidorhidra,$hidraport);
@@ -221,10 +221,9 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){
$auxKey = explode(";", $cadenaoga);
$i = 0;
foreach ($auxIp as $ip) {
- //$urls[$ip]['url'] = "https://$ip:8000/opengnsys/$urlcomando";
- //if (isset($auxKey[$i])) $aurls[$ip]['header'] = "https://$ip:8000/opengnsys/$urlcomando?secret=".$auxKey[$i];
- $urls[$ip]['url'] = "https://$ip:8000/opengnsys/$urlcomando?secret=".$auxKey[$i];
- if (isset($paramsPost)) $aurls[$ip]['post'] = $paramsPost;
+ $urls[$ip]['url'] = "https://$ip:8000/opengnsys/$urlcomando";
+ if (isset($auxKey[$i])) $urls[$ip]['header'] = Array("Authorization: ".$auxKey[$i]);
+ if (isset($paramsPost)) $urls[$ip]['post'] = $paramsPost;
$i++;
}