btrbk: accept quoted values in config

unsafe-filenames
Axel Burri 2021-07-14 21:58:15 +02:00
parent 5d94de9142
commit d7f6d5fecf
1 changed files with 2 additions and 0 deletions

2
btrbk
View File

@ -4463,6 +4463,8 @@ sub parse_config($)
{ {
# NOTE: we do not perform checks on indentation! # NOTE: we do not perform checks on indentation!
my ($indent, $key, $value) = (length($1), lc($2), $4 // ""); my ($indent, $key, $value) = (length($1), lc($2), $4 // "");
$value =~ s/^"(.*)"$/$1/;
$value =~ s/^'(.*)'$/$1/;
$cur = parse_config_line($file, $root, $cur, $key, $value); $cur = parse_config_line($file, $root, $cur, $key, $value);
unless(defined($cur)) { unless(defined($cur)) {
# error, bail out # error, bail out