parscit/lib/SectLabel/Controller.pm in biblicit-2.2.1 vs parscit/lib/SectLabel/Controller.pm in biblicit-2.2.2

- old
+ new

@@ -210,11 +210,11 @@ if (! defined $headers) { return; }; my $num_headers = scalar(@{ $headers }); # Put the list of headers to file - my $header_file = "/tmp/" . NewTmpFile(); + my $header_file = NewTmpFile(); $generic_sect_path = UntaintPath($generic_sect_path); open(OF, ">:utf8", $header_file); for (my $i = 0; $i < $num_headers; $i++) { print OF $headers->[$i] . "\n"; } @@ -326,9 +326,11 @@ { my $tmpfile = `date '+%Y%m%d-%H%M%S-$$'`; chomp($tmpfile); $tmpfile = UntaintPath($tmpfile); - return $tmpfile; + + my $tmpdir = $ENV{'PARSCIT_TMPDIR'} || "/tmp"; + return "$tmpdir/$tmpfile"; } 1;