]> git.proxmox.com Git - qemu-server.git/commitdiff
fix bug 790: encode description before writing to syslog
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 29 Oct 2015 09:49:08 +0000 (10:49 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 29 Oct 2015 09:49:08 +0000 (10:49 +0100)
PVE/API2/Qemu.pm

index 3f16bcd3cc7bbe1bbbe0e2c12985879cb6a20d96..6439feea649b67a0f557cee8597558d46ef5a14e 100644 (file)
@@ -789,7 +789,11 @@ my $update_vm_api  = sub {
 
     my @paramarr = (); # used for log message
     foreach my $key (keys %$param) {
-       push @paramarr, "-$key", $param->{$key};
+       if ($key eq 'description') {
+           push @paramarr, "-$key",  PVE::Tools::encode_text($param->{$key});
+       } else {
+           push @paramarr, "-$key", $param->{$key};
+       }
     }
 
     my $skiplock = extract_param($param, 'skiplock');