--- rpms/smeserver-awstats/contribs10/smeserver-awstats-1.4-bz11045.patch 2021/02/22 20:43:18 1.3 +++ rpms/smeserver-awstats/contribs10/smeserver-awstats-1.4-bz11045.patch 2021/02/22 21:16:30 1.5 @@ -122,9 +122,87 @@ diff -Nur smeserver-awstats-1.4.old/root -); - -exit (0); +diff -Nur smeserver-awstats-1.4.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf smeserver-awstats-1.4/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf +--- smeserver-awstats-1.4.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf 2018-07-20 09:44:29.000000000 -0400 ++++ smeserver-awstats-1.4/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf 2021-02-22 16:15:21.799000000 -0500 +@@ -165,6 +165,7 @@ + + my $networkDB = esmith::ConfigDB->open('networks') or die("can't open Networks DB"); + my $skipHosts = $configDB->get_prop( "AWStats", "SkipHosts" ) || ''; ++ my $allIPs = ""; + + $OUT = "SkipHosts=\""; + +@@ -205,6 +206,9 @@ + + } + } ++ ++ # Escape full stops e.g. \.co\.uk ; for REGEX only ++ $allIPs =~ s/\./\\./g; + + # external IP + # +@@ -216,6 +220,8 @@ + # If Skip ExternalIP is set to mask + if ( defined $ipskipExtIP && $ipskipExtIP eq "mask" ) { + my $return = mip( $externalip, $externalnetmask ); ++ #Escape full stops e.g. \.co\.uk ; for REGEX only ++ $return =~ s/\./\\./g; + $allIPs .= "REGEX[^$return] "; + + } +@@ -226,12 +232,6 @@ + } + + } +- # Always add +- #$allIPs = "127.0.0.1 $allIPs"; +- +- # Escape full stops e.g. \.co\.uk +- $allIPs =~ s/\./\\./g; +- + $OUT .= "127.0.0.1 $skipHosts $allIPs"; + + $OUT .= '"' . "\n"; +@@ -242,7 +242,7 @@ + + my $domainsDB = esmith::ConfigDB->open('domains') or die("can't open Domains DB"); + +- $OUT .= 'HostAliases="localhost 127\.0\.0\.1'; ++ $OUT .= 'HostAliases="localhost 127.0.0.1'; + + # push( @aliases, $DynDnsHostname ) if defined $DynDnsHostname; + # Need to find DynDnsHostname if it exists +@@ -259,11 +259,11 @@ + # needed for IE6 beta + if ( defined $ipskipExtIP && $ipskipExtIP eq "mask" ) { + $externalip = mip( $externalip, $externalnetmask ); +- $externalip =~ s/\./\\./g; ++ #$externalip =~ s/\./\\./g; + $OUT .= " " . $externalip; + } + elsif ( defined $ipskipExtIP && $ipskipExtIP eq "yes" ) { +- $externalip =~ s/\./\\./g; ++ #$externalip =~ s/\./\\./g; + $OUT .= " " . $externalip; + } + diff -Nur smeserver-awstats-1.4.old/root/etc/yum/post-actions/awstats.action smeserver-awstats-1.4/root/etc/yum/post-actions/awstats.action --- smeserver-awstats-1.4.old/root/etc/yum/post-actions/awstats.action 1969-12-31 19:00:00.000000000 -0500 +++ smeserver-awstats-1.4/root/etc/yum/post-actions/awstats.action 2021-02-22 15:02:23.606000000 -0500 @@ -0,0 +1,2 @@ +awstats:install:/etc/e-smith/events/actions/awstats-upgrade +awstats:update:/etc/e-smith/events/actions/awstats-upgrade +diff -Nur smeserver-awstats-1.4.old/root/sbin/e-smith/awstats-pp smeserver-awstats-1.4/root/sbin/e-smith/awstats-pp +--- smeserver-awstats-1.4.old/root/sbin/e-smith/awstats-pp 2007-04-06 00:59:44.000000000 -0400 ++++ smeserver-awstats-1.4/root/sbin/e-smith/awstats-pp 2021-02-22 16:10:24.112000000 -0500 +@@ -47,7 +47,7 @@ + + my $status=db_get_prop(\%conf, "AWStats", "status"); + exit (0) if not defined $status || $status ne "enabled"; +-$debug=(db_get_prop(\%conf, "AWStats", "Debug") eq "yes"); ++$debug=((db_get_prop(\%conf, "AWStats", "Debug") ||"no") eq "yes"); + + # primitive command line options parsing + foreach (@ARGV) {