Search
j0ke.net Open Build Service
>
Projects
>
vhcs
>
awstats
> awstats-7.0-CVE-2006-2237_read_open.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File awstats-7.0-CVE-2006-2237_read_open.patch of Package awstats
--- wwwroot/cgi-bin/awstats.pl.orig 2010-10-16 19:24:03.000000000 +0200 +++ wwwroot/cgi-bin/awstats.pl 2011-01-07 20:26:06.811019892 +0100 @@ -1739,20 +1739,20 @@ foreach (@PossibleConfigDir) { my $searchdir = $_; if ( $searchdir && $searchdir !~ /[\\\/]$/ ) { $searchdir .= "/"; } - if ( open( CONFIG, "$searchdir$PROG.$SiteConfig.conf" ) ) { + if ( open( CONFIG, "<$searchdir$PROG.$SiteConfig.conf" ) ) { $FileConfig = "$searchdir$PROG.$SiteConfig.conf"; $FileSuffix = ".$SiteConfig"; if ($Debug){debug("Opened config: $searchdir$PROG.$SiteConfig.conf", 2);} last; }else{if ($Debug){debug("Unable to open config file: $searchdir$PROG.$SiteConfig.conf", 2);}} - if ( open( CONFIG, "$searchdir$PROG.conf" ) ) { + if ( open( CONFIG, "<$searchdir$PROG.conf" ) ) { $FileConfig = "$searchdir$PROG.conf"; $FileSuffix = ''; if ($Debug){debug("Opened config: $searchdir$PROG.$SiteConfig.conf", 2);} last; }else{if ($Debug){debug("Unable to open config file: $searchdir$PROG.conf", 2);}} #CL - Added to open config if full path is passed to awstats - if ( open( CONFIG, "$SiteConfig" ) ) { + if ( open( CONFIG, "<$SiteConfig" ) ) { $FileConfig = "$SiteConfig"; $FileSuffix = ''; if ($Debug){debug("Opened config: $SiteConfig", 2);} @@ -2308,7 +2308,7 @@ { $searchdir .= "/"; } - if ( open( LANG, "${searchdir}awstats-$_[0].txt" ) ) { + if ( open( LANG, "<${searchdir}awstats-$_[0].txt" ) ) { $FileLang = "${searchdir}awstats-$_[0].txt"; last; } @@ -2324,7 +2324,7 @@ { $searchdir .= "/"; } - if ( open( LANG, "${searchdir}awstats-en.txt" ) ) { + if ( open( LANG, "<${searchdir}awstats-en.txt" ) ) { $FileLang = "${searchdir}awstats-en.txt"; last; } @@ -3640,7 +3640,7 @@ # Open files if ($withread) { - open( HISTORY, $filetoread ) + open( HISTORY, "<$filetoread" ) || error( "Couldn't open file \"$filetoread\" for read: $!", "", "", $MigrateStats ); binmode HISTORY @@ -7498,7 +7498,7 @@ LoadCache_hashfiles( $filetoload, $hashtoload ); } if ( !scalar keys %$hashtoload ) { - open( DNSFILE, "$filetoload" ) + open( DNSFILE, "<$filetoload" ) or error("Couldn't open DNS Cache file \"$filetoload\": $!"); #binmode DNSFILE; # If we set binmode here, it seems that the load is broken on ActiveState 5.8 @@ -7893,7 +7893,7 @@ my $filesource = shift; my $filetarget = shift; if ($Debug) { debug( "FileCopy($filesource,$filetarget)", 1 ); } - open( FILESOURCE, "$filesource" ) || return 1; + open( FILESOURCE, "<$filesource" ) || return 1; open( FILETARGET, ">$filetarget" ) || return 1; binmode FILESOURCE; binmode FILETARGET; @@ -17520,7 +17520,7 @@ # Open log file if ($Debug) { debug("Open log file \"$LogFile\""); } - open( LOG, "$LogFile" ) + open( LOG, "<$LogFile" ) || error("Couldn't open server log file \"$LogFile\" : $!"); binmode LOG ; # Avoid premature EOF due to log files corrupted with \cZ or bin chars