[pve-devel] [PATCH manager] shellquote the upgradecmd for xtermjs
Dominik Csapak
d.csapak at proxmox.com
Tue Jan 16 15:20:10 CET 2018
this was missing and led to 'connection closed' after upgrading
a remote host via xtermjs
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Nodes.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index f11fd169..6df6396a 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -823,6 +823,7 @@ __PACKAGE__->register_method ({
if ($user eq 'root at pam') {
if ($param->{upgrade}) {
my $upgradecmd = "pveupgrade --shell";
+ $upgradecmd = PVE::Tools::shellquote($upgradecmd) if $remip;
$concmd = [ '/bin/bash', '-c', $upgradecmd ];
} else {
$concmd = [ '/bin/login', '-f', 'root' ];
--
2.11.0
More information about the pve-devel
mailing list