From 010ff16e9f959ee1009003e32bb715581f39e58b Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Thu, 28 Apr 2022 10:07:39 +0200 Subject: [PATCH] vzdump: check that notes-template is a single line While vzdump itself wouldn't mind about unescaped newlines, the parameter isn't supposed to contain any, and when used as part of the job config, it has to be a single line too, so make it consistent. Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index fcbd87d5..80cbddb5 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -1326,6 +1326,9 @@ sub verify_vzdump_parameters { $parse_prune_backups_maxfiles->($param, 'CLI parameters'); + raise_param_exc({'notes-template' => "contains a line feed"}) + if $param->{'notes-template'} && $param->{'notes-template'} =~ m/\n/; + $param->{all} = 1 if (defined($param->{exclude}) && !$param->{pool}); return if !$check_missing;