Search
j0ke.net Open Build Service
>
Projects
>
vhcs
>
awstats
> awstats-6.95-CVE-2006-2237_read_open.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File awstats-6.95-CVE-2006-2237_read_open.patch of Package awstats
--- wwwroot/cgi-bin/awstats.pl.orig 2009-01-12 10:20:56.000000000 +0100 +++ wwwroot/cgi-bin/awstats.pl 2009-01-12 10:31:13.000000000 +0100 @@ -1653,12 +1653,12 @@ 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"; last; } - if ( open( CONFIG, "$searchdir$PROG.conf" ) ) { + if ( open( CONFIG, "<$searchdir$PROG.conf" ) ) { $FileConfig = "$searchdir$PROG.conf"; $FileSuffix = ''; last; @@ -2196,7 +2196,7 @@ { $searchdir .= "/"; } - if ( open( LANG, "${searchdir}awstats-$_[0].txt" ) ) { + if ( open( LANG, "<${searchdir}awstats-$_[0].txt" ) ) { $FileLang = "${searchdir}awstats-$_[0].txt"; last; } @@ -2212,7 +2212,7 @@ { $searchdir .= "/"; } - if ( open( LANG, "${searchdir}awstats-en.txt" ) ) { + if ( open( LANG, "<${searchdir}awstats-en.txt" ) ) { $FileLang = "${searchdir}awstats-en.txt"; last; } @@ -3502,7 +3502,7 @@ # Open files if ($withread) { - open( HISTORY, $filetoread ) + open( HISTORY, "<$filetoread" ) || error( "Couldn't open file \"$filetoread\" for read: $!", "", "", $MigrateStats ); binmode HISTORY @@ -7226,7 +7226,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 @@ -7618,7 +7618,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; @@ -10440,7 +10440,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