From: Laurent Destailleur Date: Mon, 17 Dec 2018 11:59:51 +0000 (+0100) Subject: FIX #90 X-Git-Tag: AWSTATS_7_8~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4d815d0caae3dbae83ac70a1ae4581bd57cf376;p=thirdparty%2FAWStats.git FIX #90 --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index b04ed6f8..b789a2c0 100755 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -1780,22 +1780,24 @@ sub Read_Config { }else{if ($Debug){debug("Unable to open config file: $searchdir$SiteConfig", 2);}} } - #CL - Added to open config if full path is passed to awstats - if ( !$FileConfig ) { - - my $SiteConfigBis = File::Spec->rel2abs($SiteConfig); - debug("Finally, try to open an absolute path : $SiteConfigBis", 2); - - if ( -f $SiteConfigBis && open(CONFIG, "$SiteConfigBis")) { - $FileConfig = "$SiteConfigBis"; - $FileSuffix = ''; - if ($Debug){debug("Opened config: $SiteConfigBis", 2);} - $SiteConfig=$SiteConfigBis; - } - else { - if ($Debug){debug("Unable to open config file: $SiteConfigBis", 2);} - } - } + #CL - Added to open config if full path is passed to awstats + # Disabled by LDR for security reason. + # If we need to execute config into other dir + #if ( !$FileConfig ) { + # + # my $SiteConfigBis = File::Spec->rel2abs($SiteConfig); + # debug("Finally, try to open an absolute path : $SiteConfigBis", 2); + # + # if ( -f $SiteConfigBis && open(CONFIG, "$SiteConfigBis")) { + # $FileConfig = "$SiteConfigBis"; + # $FileSuffix = ''; + # if ($Debug){debug("Opened config: $SiteConfigBis", 2);} + # $SiteConfig=$SiteConfigBis; + # } + # else { + # if ($Debug){debug("Unable to open config file: $SiteConfigBis", 2);} + # } + #} if ( !$FileConfig ) { if ($DEBUGFORCED || !$ENV{'GATEWAY_INTERFACE'}){