From cc62d4667787aa1411eac484de5553bfa746b664 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 21 Aug 2026 00:37:11 +0200 Subject: [PATCH] Fix parsing of Bacula sections opened with an equals sign https://github.com/webmin/webmin/issues/2112#issuecomment-5362249697 --- bacula-backup/bacula-backup-lib.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bacula-backup/bacula-backup-lib.pl b/bacula-backup/bacula-backup-lib.pl index b83766b2d..276493e5a 100755 --- a/bacula-backup/bacula-backup-lib.pl +++ b/bacula-backup/bacula-backup-lib.pl @@ -165,6 +165,15 @@ if (!defined($config_file_cache{$file})) { 'parent' => $parent }; push(@{$parent->{'members'}}, $dir); + # A line like "Include = {" starts a section, rather + # than setting the value to a brace. The brace must be + # unquoted, so that a real value of "{" is preserved + if ($dir->{'value'} eq "{" && $rest !~ /\S/ && + /=\s*\{\s*$/) { + $dir->{'value'} = undef; + $rest = "{"; + } + if ($rest =~ /\s*{\s*$/) { # Also start of a section! $dir->{'type'} = 2;