From 1f581ff78e4dc4812db22b6c76d2786deac5b769 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Tue, 3 May 2022 13:17:59 +0200 Subject: [PATCH] vzdump: notes-template: improve check for unknown variable so that '{{foo}}{{bar}}' is not detected as being an unknown variable named 'foo}}{{bar', but as 'foo' (and 'bar'). Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 9af2de3d..05cc1bec 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -92,7 +92,7 @@ my $generate_notes = sub { my $vars = join('|', keys $info->%*); $notes_template =~ s/\{\{($vars)\}\}/$info->{$1}/g; - die "unexpected variable name '$1'" if $notes_template =~ m/\{\{([^\s]+)\}\}/; + die "unexpected variable name '$1'" if $notes_template =~ m/\{\{([^\s}]+)\}\}/; return $notes_template; }; -- 2.39.2