diff -Nur smeserver-gitweb-1.1.0.old/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook smeserver-gitweb-1.1.0/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook --- smeserver-gitweb-1.1.0.old/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook 2016-06-22 12:52:10.450000000 -0400 +++ smeserver-gitweb-1.1.0/root/etc/e-smith/templates/etc/gitweb.conf/60ExportAuthHook 2016-06-22 13:05:27.508000000 -0400 @@ -84,15 +84,22 @@ my %properties = $repository->props; # Check if the request is from a local IP address for this host - - # Get server private IP address and mask for access to the local network only - my @network_setting = split(/[\/ ]/, $local_network_setting ); - - # Check if the REMOTE_ADDR is within the range of the 'private' address for this server - my $remote_addr = NetAddr::IP->new( $ENV\{'REMOTE_ADDR'\} ); - if( $remote_addr->within( new NetAddr::IP @network_setting[1], @network_setting[2] ) ) \{ - return 1; # EXIT LOCAL HOST -> REPOSITORY VIEW ALLOWED - \} + my @network_set = split(/ /, $local_network_setting ); + + for my $cur_network (@network_set) \{ + $cur_network = "$cur_network/255.255.255.255" unless $cur_network =~ /[0-9.]*\/[0-9.]*/; + + # Get server private IP address and mask for access to the local + # network only + my @network_setting = split(/\//, $cur_network ); + + # Check if the REMOTE_ADDR is within the range of the + # 'private' address for this server + my $remote_addr = NetAddr::IP->new( $ENV{'REMOTE_ADDR'} ); + if( $remote_addr->within( new NetAddr::IP @network_setting[0], @network_setting[1] ) ) \{ + return 1; # EXIT LOCAL HOST -> REPOSITORY VIEW ALLOWED + \} + \} # See if internet access is allowed on this repository. if ($properties\{'allow_access_from'\}) \{