summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-05-28 11:33:22 +0000
committerivan <ivan>2004-05-28 11:33:22 +0000
commit2fff06f0742676bf4edbb84cab007681de1d08a3 (patch)
treed67e2654503784f6d29936fdb36dc94fbd88df6f
parent32369935cdd8812140cae4708a4588a8282b96b3 (diff)
not entirely sure why we're checking the filename at all... to catch empty form submissions?
-rw-r--r--httemplate/misc/upload-batch.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi
index da5e41cbc..5d0150177 100644
--- a/httemplate/misc/upload-batch.cgi
+++ b/httemplate/misc/upload-batch.cgi
@@ -2,8 +2,9 @@
my $fh = $cgi->upload('batch_results');
my $filename = $cgi->param('batch_results');
- $filename =~ /^.*[\/\\]([^\/\\]+)$/ or die "unparsable filename: $filename\n";
- my $paybatch = $1;
+ $filename =~ /^(.*[\/\\])?([^\/\\]+)$/
+ or die "unparsable filename: $filename\n";
+ my $paybatch = $2;
my $error = defined($fh)
? FS::cust_pay_batch::import_results( {