]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
FIX #90
authorLaurent Destailleur <eldy@destailleur.fr>
Mon, 17 Dec 2018 11:59:51 +0000 (12:59 +0100)
committerLaurent Destailleur <eldy@destailleur.fr>
Mon, 17 Dec 2018 11:59:51 +0000 (12:59 +0100)
wwwroot/cgi-bin/awstats.pl

index b04ed6f8fe931d36b4e17a9c2f2ade504033b8f5..b789a2c01ca0db216b4154f15de0ff553cd6db09 100755 (executable)
@@ -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'}){