From d944df2272b0fbed9f5a52136d60f4318186e8b9 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Fri, 27 Jul 2012 21:45:47 -0400 Subject: [PATCH 1/2] Bug 8268 follow-up: rewrite config correctly Signed-off-by: Marcel de Rooy Problem fixed. --- rewrite-config.PL | 1 + 1 file changed, 1 insertion(+) diff --git a/rewrite-config.PL b/rewrite-config.PL index 083b3a898f..02715ab48f 100644 --- a/rewrite-config.PL +++ b/rewrite-config.PL @@ -101,6 +101,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; "__KOHA_GROUP__" => "koha", "__ZEBRA_PASS__" => "zebrastripes", "__ZEBRA_USER__" => "kohauser", + '__BACKUP_DIR__' => "$prefix/var/spool", '__INTRANET_CGI_DIR__' => "$prefix/intranet/cgi-bin", '__INTRANET_TMPL_DIR__' => "$prefix/intranet/templates", '__INTRANET_WWW_DIR__' => "$prefix/intranet/www", From 20ad69646fee22d85af57d23a694c5c6e6208b72 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Wed, 1 Aug 2012 16:30:45 +0200 Subject: [PATCH 2/2] Bug 8268: improve error checking Valid download attempts were being denied thanks to an incorrect regular expression. This patch fixes that, and makes it easier to understand what's going on in the code. Signed-off-by: Jonathan Druart Signed-off-by: Paul Poulain --- tools/export.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/export.pl b/tools/export.pl index d3ad16f57c..9259c50b2e 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -345,7 +345,8 @@ sub download_backup { my $filename = $args->{filename}; return unless ( $directory && -d $directory ); - return unless ( $filename =~ m/$extension(\.(gz|bz2|xz))?$/ && not $filename =~ m#|# ); + return unless ( $filename =~ m/\.$extension(\.(gz|bz2|xz))?$/ ); + return if ( $filename =~ m#/# ); $filename = "$directory/$filename"; return unless ( -f $filename && -r $filename ); return unless ( open(my $dump, '<', $filename) );