/[pkgs]/devel/perl/25_fix_cgi_tempdir
ViewVC logotype

Contents of /devel/perl/25_fix_cgi_tempdir

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Mar 11 22:01:05 2009 UTC (8 months, 1 week ago) by spot
Branch: MAIN
CVS Tags: F-12-split, perl-5_10_0-63_fc11, perl-5_10_0-61_fc11, perl-5_10_0-80_fc12, perl-5_10_0-81_fc12, perl-5_10_0-84_fc13, perl-5_10_0-82_fc13, perl-5_10_0-77_fc12, perl-5_10_0-83_fc13, perl-5_10_0-71_fc12, perl-5_10_0-75_fc12, perl-5_10_0-73_fc12, perl-5_10_0-68_fc11, perl-5_10_0-67_fc11, perl-5_10_0-64_fc11, perl-5_10_0-72_fc12, F-11-split, perl-5_10_0-62_fc11, perl-5_10_0-69_fc12, perl-5_10_0-79_fc12, perl-5_10_0-78_fc12, perl-5_10_0-70_fc12, perl-5_10_0-74_fc12, perl-5_10_0-66_fc11, perl-5_10_0-65_fc11, perl-5_10_0-76_fc12, HEAD
reorder @INC, fix bz 489204, merge useful debian patches
1 Fix tainted usage of $ENV{TMPDIR} as an sprintf format in CGI.pm. (Closes: #494679)
2
3 [rt.perl.org #50322]
4 Bleadperl change 33143.
5
6 Note that the inconsistent usage of backslashes doesn't matter, as
7 the whole thing is eval'd in.
8 diff --git a/lib/CGI.pm b/lib/CGI.pm
9 index c0158cb..1bc74a3 100644
10 --- a/lib/CGI.pm
11 +++ b/lib/CGI.pm
12 @@ -4032,7 +4032,7 @@ sub new {
13 my $filename;
14 find_tempdir() unless -w $TMPDIRECTORY;
15 for (my $i = 0; $i < $MAXTRIES; $i++) {
16 - last if ! -f ($filename = sprintf("${TMPDIRECTORY}${SL}CGItemp%d",$sequence++));
17 + last if ! -f ($filename = sprintf("\%s${SL}CGItemp%d",$TMPDIRECTORY,$sequence++));
18 }
19 # check that it is a more-or-less valid filename
20 return unless $filename =~ m!^([a-zA-Z0-9_ \'\":/.\$\\-]+)$!;

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2