]> git.proxmox.com Git - pve-storage.git/commitdiff
extract_vzdump_config: handle RE consistently
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 20 Jan 2017 09:03:34 +0000 (10:03 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 20 Jan 2017 10:14:01 +0000 (11:14 +0100)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/Storage.pm

index b9ea42ae9716de87ec303540c4f862a942ce5763..eb7000f9b0e83ffc2215fec104f2cefde2783c2c 100755 (executable)
@@ -1327,7 +1327,7 @@ sub extract_vzdump_config_tar {
 
     my $file;
     while (defined($file = <$fh>)) {
-       if ($file =~ m!$conf_re!) {
+       if ($file =~ $conf_re) {
            $file = $1; # untaint
            last;
        }
@@ -1414,7 +1414,7 @@ sub extract_vzdump_config {
     my $archive = abs_filesystem_path($cfg, $volid);
 
     if ($volid =~ /vzdump-(lxc|openvz)-\d+-(\d{4})_(\d{2})_(\d{2})-(\d{2})_(\d{2})_(\d{2})\.(tgz|(tar(\.(gz|lzo))?))$/) {
-       return extract_vzdump_config_tar($archive,'^(\./etc/vzdump/(pct|vps)\.conf)$');
+       return extract_vzdump_config_tar($archive, qr!^(\./etc/vzdump/(pct|vps)\.conf)$!);
     } elsif ($volid =~ /vzdump-qemu-\d+-(\d{4})_(\d{2})_(\d{2})-(\d{2})_(\d{2})_(\d{2})\.(tgz|((tar|vma)(\.(gz|lzo))?))$/) {
        my $format;
        my $comp;