diff --git a/html/cgi-bin/aliases.cgi b/html/cgi-bin/aliases.cgi
index 85ed27204..7b80b3c84 100644
--- a/html/cgi-bin/aliases.cgi
+++ b/html/cgi-bin/aliases.cgi
@@ -62,7 +62,7 @@ $settings{'IP'} = '';
$settings{'ENABLED'} = 'off'; # Every check box must be set to off
$settings{'NAME'} = '';
my @nosaved=('IP','ENABLED','NAME'); # List here ALL setting2 fields. Mandatory
-
+
$settings{'ACTION'} = ''; # add/edit/remove
$settings{'KEY1'} = ''; # point record for ACTION
@@ -94,16 +94,16 @@ if (open(FILE, "$datafile")) {
# Remove if no Setting1 needed
#
if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
-
+
#
#Validate static Settings1 here
#
unless ($errormessage) { # Everything is ok, save settings
- #map (delete ($settings{$_}) ,(@nosaved,'ACTION','KEY1'));# Must never be saved
+ #map (delete ($settings{$_}) ,(@nosaved,'ACTION','KEY1'));# Must never be saved
#&General::writehash($setting, \%settings); # Save good settings
#$settings{'ACTION'} = $Lang::tr{'save'}; # Recreate 'ACTION'
#map ($settings{$_}= '',(@nosaved,'KEY1')); # and reinit var to empty
-
+
# Rebuild configuration file if needed
&BuildConfiguration;
@@ -133,14 +133,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
$temp[2] = '' if ( $temp[2] eq '' );
@current[$settings{'KEY1'}] = join (',',@temp)."\n";
$settings{'KEY1'} = ''; # End edit mode
-
+
&General::log($Lang::tr{'ip alias changed'});
-
+
#Save current
open(FILE, ">$datafile") or die 'Unable to open aliases file.';
print FILE @current;
close(FILE);
-
+
# Rebuild configuration file
&BuildConfiguration;
@@ -230,7 +230,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
# Handle Suricata related actions.
&HandleSuricata();
-
+
##
## if entering data line is repetitive, choose here to not erase fields between each addition
##
@@ -253,7 +253,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'edit'}) {
}
if ($settings{'ACTION'} eq $Lang::tr{'remove'}) {
- splice (@current,$settings{'KEY1'},1); # Delete line
+ splice (@current,$settings{'KEY1'},1); # Delete line
open(FILE, ">$datafile") or die 'Unable to open aliases file.';
print FILE @current;
close(FILE);
@@ -291,7 +291,7 @@ if ($ENV{'QUERY_STRING'} =~ /$sortstring/ ) {
if ($settings{'ACTION'} eq '' ) { # First launch from GUI
$settings{'ENABLED'} ='on';
}
-
+
&Header::openpage($Lang::tr{'external aliases configuration'}, 1, '');
&Header::openbigbox('100%', 'left', '', $errormessage);
my %checked =(); # Checkbox manipulations
@@ -314,7 +314,7 @@ END
;
&Header::closebox();
}
-
+
#
# Second check box is for editing the list
#
@@ -406,7 +406,7 @@ foreach my $line (@current) {
$gdesc = $Lang::tr{'click to disable'};
} else {
$gif = 'off.gif';
- $gdesc = $Lang::tr{'click to enable'};
+ $gdesc = $Lang::tr{'click to enable'};
}
#Colorize each line
@@ -488,7 +488,7 @@ END
sub SortDataFile
{
our %entries = ();
-
+
# Sort pair of record received in $a $b special vars.
# When IP is specified use numeric sort else alpha.
# If sortname ends with 'Rev', do reverse sort.
@@ -527,27 +527,27 @@ sub SortDataFile
foreach my $line (@current) {
chomp( $line); #remove newline because can be on field 5 or 6 (addition of REMARK)
my @temp = split (',',$line);
-
+
# Build a pair 'Field Name',value for each of the data dataline.
# Each SORTABLE field must have is pair.
# Other data fields (non sortable) can be grouped in one
-
+
# Exemple
# F1,F2,F3,F4,F5 only F1 F2 for sorting
# my @record = ('KEY',$key++,
# 'F1',$temp[0],
# 'F2',$temp[1],
# 'DATA',join(',',@temp[2..4]) ); #group remainning values, with separator (,)
-
+
# The KEY,key record permits doublons. If removed, then F1 becomes the key without doublon permitted.
-
-
+
+
my @record = ('KEY',$key++,'IP',$temp[0],'ENABLED',$temp[1],'NAME',$temp[2]);
my $record = {}; # create a reference to empty hash
%{$record} = @record; # populate that hash with @record
$entries{$record->{KEY}} = $record; # add this to a hash of hashes
}
-
+
open(FILE, ">$datafile") or die 'Unable to open aliases file.';
# Each field value is printed , with the newline ! Don't forget separator and order of them.
@@ -562,7 +562,7 @@ sub SortDataFile
close (FILE);
}
-#
+#
# Build the configuration file for application aliases
#
sub BuildConfiguration {
diff --git a/html/cgi-bin/atm-status.cgi b/html/cgi-bin/atm-status.cgi
index 49f19209d..fb38dc030 100644
--- a/html/cgi-bin/atm-status.cgi
+++ b/html/cgi-bin/atm-status.cgi
@@ -53,18 +53,18 @@ foreach (@modems){
my $value= `cat /sys/class/atm/$modem/parameters/$param`;
chomp($param);
chomp($value);
- if (!($param =~"uevent")
+ if (!($param =~"uevent")
&& !($param =~"resource")
&& !($param eq "")
) {
-
+
$lines++;
if ($lines % 2){
print "
";
$col="bgcolor='$color{'color22'}'";
diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi
index f1fbfd235..0a0a21d68 100644
--- a/html/cgi-bin/dhcp.cgi
+++ b/html/cgi-bin/dhcp.cgi
@@ -47,7 +47,7 @@ my $warnNTPmessage = '';
my @nosaved=();
my %color = ();
-#Basic syntax allowed for new Option definition. Not implemented: RECORDS & array of RECORDS
+#Basic syntax allowed for new Option definition. Not implemented: RECORDS & array of RECORDS
our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of ip-address';
&Header::showhttpheaders();
@@ -153,14 +153,14 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) {
$errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid end address'};
goto ERROR;
}
- if (! &General::IpInSubnet ( $dhcpsettings{"START_ADDR_${itf}"},
+ if (! &General::IpInSubnet ( $dhcpsettings{"START_ADDR_${itf}"},
$netsettings{"${itf}_NETADDRESS"},
$netsettings{"${itf}_NETMASK"})) {
$errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid start address'};
goto ERROR;
}
}
-
+
if ($dhcpsettings{"END_ADDR_${itf}"}) {
if (!(&General::validip($dhcpsettings{"END_ADDR_${itf}"}))) {
$errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid end address'};
@@ -170,9 +170,9 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) {
$errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid start address'};
goto ERROR;
}
- if (! &General::IpInSubnet ( $dhcpsettings{"END_ADDR_${itf}"},
+ if (! &General::IpInSubnet ( $dhcpsettings{"END_ADDR_${itf}"},
$netsettings{"${itf}_NETADDRESS"},
- $netsettings{"${itf}_NETMASK"})) {
+ $netsettings{"${itf}_NETMASK"})) {
$errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid end address'};
goto ERROR;
}
@@ -214,7 +214,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) {
goto ERROR;
}
if (! $dhcpsettings{"DNS1_${itf}"}) {
- $errormessage = "DHCP on ${itf}: " . $Lang::tr{'cannot specify secondary dns without specifying primary'};
+ $errormessage = "DHCP on ${itf}: " . $Lang::tr{'cannot specify secondary dns without specifying primary'};
goto ERROR;
}
}
@@ -233,7 +233,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) {
if (! $dhcpsettings{"WINS1_${itf}"} ) {
$errormessage = "DHCP on ${itf}: " . $Lang::tr{'cannot specify secondary wins without specifying primary'};
goto ERROR;
- }
+ }
}
if ($dhcpsettings{"NEXT_${itf}"}) {
if (!(&General::validip($dhcpsettings{"NEXT_${itf}"}))) {
@@ -295,14 +295,14 @@ if ($ENV{'QUERY_STRING'} =~ /^FETHER|^FIPADDR/ ) {
&General::writehash($setting, \%dhcpsettings);
&sortcurrent2;
$dhcpsettings{'ACTION'} = 'SORT'; # create an 'ACTION'
- map ($dhcpsettings{$_} = '',@nosaved,'KEY1','KEY2');# and reinit vars to empty
+ map ($dhcpsettings{$_} = '',@nosaved,'KEY1','KEY2');# and reinit vars to empty
}
#Sorting of allocated leases
&Header::CheckSortOrder;
-## Now manipulate the two multi-line list with Settings2.
+## Now manipulate the two multi-line list with Settings2.
# '1' suffix is for ADVANCED OPTIONS
# '2' suffix is for FIXED LEASES
@@ -319,12 +319,12 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'toggle enable disable'}.'1') {
open(FILE, ">$filename1") or die 'Unable to open dhcp advanced options file.';
print FILE @current1;
close(FILE);
-
+
#Write changes to dhcpd.conf.
&buildconf;
}
-
+
if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'1' &&
$dhcpsettings{'SUBMIT'} ne $Lang::tr{'dhcp advopt help'}) {
@@ -334,7 +334,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'1' &&
if ($dhcpsettings{'ADVOPT_DATA'} eq '') {
$errormessage=$Lang::tr{'dhcp advopt blank value'};
}
-
+
# Test for a new option definition string (join field name & data)
if (ExistNewOptionDefinition ($dhcpsettings{'ADVOPT_NAME'} . ' ' . $dhcpsettings{'ADVOPT_DATA'})) {
#only edit permitted if option definition exists
@@ -352,7 +352,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'1' &&
}
unless ($errormessage) {
-
+
my $scope = '';
foreach my $itf (@ITFs) { # buils "RED,GREEN,ORANGE,... based on selection
$scope .= $dhcpsettings{"ADVOPT_SCOPE_${itf}"} eq 'on' ? "\t$itf" : "\toff" ;
@@ -387,7 +387,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'edit'}.'1') {
if ($itf ne 'off') # Only is an interface name is read
{
$dhcpsettings{"ADVOPT_SCOPE_${itf}"} = 'on';
- }
+ }
}
}
@@ -416,7 +416,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'toggle enable disable'}.'2') {
open(FILE, ">$filename2") or die 'Unable to open fixed leases file.';
print FILE @current2;
close(FILE);
-
+
#Write changes to dhcpd.conf.
&buildconf;
}
@@ -428,7 +428,7 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'2') {
if ($dhcpsettings{'FIX_NEXTADDR'}) {
unless(&General::validip($dhcpsettings{'FIX_NEXTADDR'})) { $errormessage = $Lang::tr{'invalid fixed ip address'}; }
}
-
+
my $key = 0;
CHECK:foreach my $line (@current2) {
my @temp = split(/\,/,$line);
@@ -438,13 +438,13 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'2') {
# Also it may be needed to put duplicate fixed lease in their right subnet definition..
foreach my $itf (@ITFs) {
my $scoped = &General::IpInSubnet($dhcpsettings{'FIX_ADDR'},
- $netsettings{"${itf}_NETADDRESS"},
+ $netsettings{"${itf}_NETADDRESS"},
$netsettings{"${itf}_NETMASK"}) &&
$dhcpsettings{"ENABLE_${itf}"} eq 'on';
if ( $scoped &&
(lc($dhcpsettings{'FIX_MAC'}) eq lc($temp[0])) &&
&General::IpInSubnet($temp[1],
- $netsettings{"${itf}_NETADDRESS"},
+ $netsettings{"${itf}_NETADDRESS"},
$netsettings{"${itf}_NETMASK"})) {
$errormessage = "$Lang::tr{'mac address in use'} $dhcpsettings{'FIX_MAC'}";
last CHECK;
@@ -755,10 +755,10 @@ print <" : "disabled='disabled' />";
print " ";
@@ -812,7 +812,7 @@ if ($dhcpsettings{'SUBMIT'} eq $Lang::tr{'dhcp advopt help'}) {
print '
wpad
code 252=text
';
print '
wpad
"http://www.server.fr/path-to/proxy.pac"
';
print '';
-
+
}
print <";
} else {
- print "
";
+ print "
";
}
print < 1) {
+ if ($macdupl{$temp[0]} > 1) {
$ipdup = 1; # Flag up duplicates for use later
}
$ipinuse{$temp[1]} += 1;
- if ($ipinuse{$temp[1]} > 1) {
+ if ($ipinuse{$temp[1]} > 1) {
$ipdup = 1; # Flag up duplicates for use later
}
# Mark IP addresses outwith known subnets
$ipoutside{$temp[1]} = 1;
foreach my $itf (@ITFs) {
if ( &General::IpInSubnet($temp[1],
- $netsettings{"${itf}_NETADDRESS"},
+ $netsettings{"${itf}_NETADDRESS"},
$netsettings{"${itf}_NETMASK"})) {
$ipoutside{$temp[1]} = 0;
}
@@ -1055,7 +1055,7 @@ foreach my $line (@current2) {
$gdesc = $Lang::tr{'click to disable'};
} else {
$gif = 'off.gif';
- $gdesc = $Lang::tr{'click to enable'};
+ $gdesc = $Lang::tr{'click to enable'};
}
# Skip all entries that do not match the search query
@@ -1081,15 +1081,15 @@ foreach my $line (@current2) {
my $TAG2 = '';
my $TAG3 = '';
my $TAG4 = '';
- if ($ipinuse{$temp[1]} > 1) {
+ if ($ipinuse{$temp[1]} > 1) {
$TAG0 = '';
$TAG1 = '';
}
- if ($macdupl{$temp[0]} > 1) {
+ if ($macdupl{$temp[0]} > 1) {
$TAG2 = '';
$TAG3 = '';
}
- if ($ipoutside{$temp[1]} > 0) {
+ if ($ipoutside{$temp[1]} > 0) {
$TAG4 = "bgcolor='orange'" if ($dhcpsettings{'KEY2'} ne $key);
}
@@ -1230,7 +1230,7 @@ sub sortcurrent2
# use combination of ether & IP as key to allow duplicates in either but not both
$entries{$record->{FETHER} . $record->{FIPADDR}} = $record; # add this to a hash of hashes
}
-
+
open(FILE, ">$filename2") or die 'Unable to open fixed lease file.';
foreach my $entry ( sort fixedleasesort keys %entries) {
print FILE "$entries{$entry}->{FETHER},$entries{$entry}->{FIPADDR},$entries{$entry}->{DATA}\n";
@@ -1243,7 +1243,7 @@ sub sortcurrent2
close (FILE);
undef (%entries); #This array is reused latter. Clear it.
}
-
+
# Build the configuration file mixing settings, fixed leases and advanced options
sub buildconf {
open(FILE, ">/${General::swroot}/dhcp/dhcpd.conf") or die "Unable to write dhcpd.conf file";
@@ -1263,7 +1263,7 @@ sub buildconf {
} else {
print FILE "ddns-update-style none;\n";
}
-
+
# Write first new option definition
foreach my $line (@current1) {
chomp($line); # remove newline
@@ -1276,7 +1276,7 @@ sub buildconf {
foreach my $line (@current1) {
chomp($line); # remove newline
my @temp = split(/\t/,$line);
-
+
if ($temp[0] eq 'on' && !ExistNewOptionDefinition ($temp[1] . ' ' . $temp[2])){ # active & !definition
my $global=1;
for (my $key=0; $key<@ITFs; $key++) {
@@ -1289,7 +1289,7 @@ sub buildconf {
if ($global) {
print FILE "option $temp[1] $temp[2];\n";
}
- }# on
+ }# on
}# foreach line
print FILE "\n";
@@ -1329,7 +1329,7 @@ sub buildconf {
foreach my $line (@current1) {
chomp($line); # remove newline
my @temp = split(/\t/,$line); # Use TAB separator !
-
+
if ($temp[0] eq 'on'){
for (my $key=0; $key<@ITFs; $key++) {
if ($itf eq $temp[3+$key]) # Only is an interface name is read
@@ -1337,7 +1337,7 @@ sub buildconf {
print FILE "\toption $temp[1] $temp[2];\n";
}
}
- }# on
+ }# on
}# foreach line
print FILE "} #$itf\n\n";
diff --git a/html/cgi-bin/dnsforward.cgi b/html/cgi-bin/dnsforward.cgi
index e2843a81f..4af5ed200 100644
--- a/html/cgi-bin/dnsforward.cgi
+++ b/html/cgi-bin/dnsforward.cgi
@@ -18,7 +18,7 @@
# along with this program. If not, see . #
# #
###############################################################################
-
+
use strict;
# enable only the following on debugging purpose
diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi
index 154efd7b2..36c0efc2e 100644
--- a/html/cgi-bin/extrahd.cgi
+++ b/html/cgi-bin/extrahd.cgi
@@ -100,8 +100,8 @@ END
;
&General::system("/usr/local/bin/extrahdctrl", "mount", "$extrahdsettings{'PATH'}");
}
-}
-elsif ($extrahdsettings{'ACTION'} eq $Lang::tr{'delete'})
+}
+elsif ($extrahdsettings{'ACTION'} eq $Lang::tr{'delete'})
{
if ( &General::system("/usr/local/bin/extrahdctrl", "umount", "$extrahdsettings{'PATH'}")) {
open( FILE, "< $devicefile" ) or die "Unable to read $devicefile";
diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi
index 1341f5209..681d42770 100644
--- a/html/cgi-bin/firewall.cgi
+++ b/html/cgi-bin/firewall.cgi
@@ -100,7 +100,7 @@ my @protocols;
&General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
-&General::readhash($fwoptions, \%optionsfw);
+&General::readhash($fwoptions, \%optionsfw);
&General::readhash($ifacesettings, \%ifaces);
&General::readhash("$configovpn", \%ovpnsettings);
&General::readhash("$configipsecrw", \%ipsecsettings);
@@ -554,7 +554,7 @@ sub checksource
if (&General::validport($_)){
push (@values,$_);
}else{
-
+
}
}
}
@@ -836,7 +836,7 @@ sub checkrule
if (&General::validport($_)){
push (@values,$_);
}else{
-
+
}
}
}
@@ -974,16 +974,16 @@ sub checkvpn
# A Test if manual ip is part of dynamic openvpn subnet is made in getcolor
# because if one creates a custom host with the ip, we need to check the color there!
# It does not make sense to check this here
-
+
# Test if manual IP is part of an OpenVPN N2N subnet does also not make sense here
# Is also checked in getcolor
-
+
# Test if manual ip is part of an IPsec Network is also checked in getcolor
return 1;
}
sub checkvpncolor
{
-
+
}
sub deleterule
{
@@ -1247,7 +1247,7 @@ END
print"
END
&Header::closebox();
-
+
}
# Add
sub addnet
@@ -1367,11 +1367,11 @@ END
if ($fwhostsettings{'ACTION'} eq 'edithost' || $fwhostsettings{'error'} eq 'on')
{
-
+
print "
";
}else{
print "
";
- }
+ }
print "
";
&Header::closebox();
}
@@ -1397,7 +1397,7 @@ sub addgrp
$fwhostsettings{'oldgrpname'}=$fwhostsettings{'grp_name'};
my $grp=$fwhostsettings{'grp_name'};
my $rem=$fwhostsettings{'remark'};
- if ($fwhostsettings{'update'} eq ''){
+ if ($fwhostsettings{'update'} eq ''){
print<
@@ -1869,9 +1869,9 @@ sub viewtablenet
&General::readhasharray("$fwconfiginp", \%fwinp);
&General::readhasharray("$fwconfigout", \%fwout);
- if (!keys %customnetwork)
- {
- print "
$Lang::tr{'fwhost empty'}";
}else{
print<
@@ -2085,7 +2085,7 @@ sub viewtablegrp
my $delflag;
my @counter;
my %hash;
- if (!keys %customgrp)
+ if (!keys %customgrp)
{
print "
";
$col="bgcolor='$color{'color22'}'";
}
- my $ip=&getipforgroup($customgrp{$key}[2],$customgrp{$key}[3]);
+ my $ip=&getipforgroup($customgrp{$key}[2],$customgrp{$key}[3]);
if ($ip eq ''){
print"
";
$col="bgcolor='${Header::colouryellow}'";
@@ -2548,7 +2548,7 @@ sub checkname
}
}
return 1;
-
+
}
sub checkgroup
{
@@ -2574,7 +2574,7 @@ sub checkservice
}
sub checkip
{
-
+
my %hash=%{(shift)};
my $a=shift;
foreach my $key (keys %hash) {
@@ -2603,7 +2603,7 @@ sub checkservicegroup
foreach my $key (keys %customservicegrp) {
if( $customservicegrp{$key}[0] eq $fwhostsettings{'SRVGRP_NAME'} ){
$errormessage.=$Lang::tr{'fwhost err grpexist'}." ";
-
+
}
}
}
@@ -2667,7 +2667,7 @@ sub get_name
foreach my $network (sort keys %defaultNetworks)
{
return "$network" if ($val eq $defaultNetworks{$network}{'NAME'});
- }
+ }
}
sub gethostcount
{
@@ -2827,7 +2827,7 @@ sub deletefromgrp
}
}
&General::writehasharray("$config",\%hash);
-
+
}
sub plausicheck
{
@@ -2893,13 +2893,13 @@ sub plausicheck
$errormessage=$errormessage." ".$Lang::tr{'fwhost err netexist'};
$fwhostsettings{'HOSTNAME'} = $fwhostsettings{'orgname'};
if ($fwhostsettings{'update'} eq 'on'){$fwhostsettings{'ACTION'}=$edit;}
- }
- #check if network ip already exists
+ }
+ #check if network ip already exists
if (!&checkip(\%customnetwork,1))
{
$errormessage=$errormessage." ".$Lang::tr{'fwhost err net'};
if ($fwhostsettings{'update'} eq 'on'){$fwhostsettings{'ACTION'}=$edit;}
- }
+ }
#check if host with this name already exists
&General::readhasharray("$confighost", \%customhost);
if (!&checkname(\%customhost))
@@ -2920,7 +2920,7 @@ sub getipforgroup
my $name=$_[0],
my $type=$_[1];
my $value;
-
+
#get address from IPSEC NETWORK
if ($type eq 'IpSec Network'){
foreach my $key (keys %ipsecconf) {
@@ -2946,7 +2946,7 @@ sub getipforgroup
}
&deletefromgrp($name,$configgrp);
}
-
+
#get address from IPSEC HOST
if ($type eq 'IpSec Host'){
foreach my $key (keys %ipsecconf) {
@@ -2956,7 +2956,7 @@ sub getipforgroup
}
&deletefromgrp($name,$configgrp);
}
-
+
#get address from ovpn ccd Net-2-Net
if ($type eq 'OpenVPN N-2-N'){
foreach my $key (keys %ccdhost) {
@@ -2968,7 +2968,7 @@ sub getipforgroup
}
&deletefromgrp($name,$configgrp);
}
-
+
#get address from ovpn ccd static host
if ($type eq 'OpenVPN static host'){
foreach my $key (keys %ccdhost) {
@@ -2980,7 +2980,7 @@ sub getipforgroup
}
&deletefromgrp($name,$configgrp);
}
-
+
#get address from ovpn ccd static net
if ($type eq 'OpenVPN static network'){
foreach my $key (keys %ccdnet) {
@@ -2991,7 +2991,7 @@ sub getipforgroup
}
}
}
-
+
#check custom addresses
if ($type eq 'Custom Host'){
foreach my $key (keys %customhost) {
@@ -3001,7 +3001,7 @@ sub getipforgroup
}
}
}
-
+
##check custom networks
if ($type eq 'Custom Network'){
foreach my $key (keys %customnetwork) {
@@ -3010,7 +3010,7 @@ sub getipforgroup
}
}
}
-
+
#check standard networks
if ($type eq 'Standard Network'){
if ($name =~ /OpenVPN/i){
@@ -3060,7 +3060,7 @@ sub decrease
}
}
}
-
+
if (($customgrp{$key}[0] eq $grp) && ($customgrp{$key}[3] eq 'Custom Host')){
foreach my $key2 (sort keys %customhost){
if ($customhost{$key2}[0] eq $customgrp{$key}[2]){
@@ -3068,7 +3068,7 @@ sub decrease
last;
}
}
-
+
}
}
&General::writehasharray("$confignet", \%customnetwork);
@@ -3079,7 +3079,7 @@ sub decreaseservice
my $grp=$_[0];
&General::readhasharray("$configsrv", \%customservice);
&General::readhasharray("$configsrvgrp", \%customservicegrp);
-
+
foreach my $key (sort keys %customservicegrp){
if ($customservicegrp{$key}[0] eq $grp ){
foreach my $key2 (sort keys %customservice){
@@ -3090,7 +3090,7 @@ sub decreaseservice
}
}
&General::writehasharray("$configsrv", \%customservice);
-
+
}
sub changenameinfw
{
@@ -3130,7 +3130,7 @@ sub changenameinfw
}
sub checkports
{
-
+
my %hash=%{(shift)};
#check empty fields
if ($fwhostsettings{'SRV_NAME'} eq '' ){
@@ -3145,7 +3145,7 @@ sub checkports
}
#change dashes with :
$fwhostsettings{'SRV_PORT'}=~ tr/-/:/;
-
+
if ($fwhostsettings{'SRV_PORT'} eq "*") {
$fwhostsettings{'SRV_PORT'} = "1:65535";
}
diff --git a/html/cgi-bin/getrrdimage.cgi b/html/cgi-bin/getrrdimage.cgi
index 26bcf0905..26e026bba 100644
--- a/html/cgi-bin/getrrdimage.cgi
+++ b/html/cgi-bin/getrrdimage.cgi
@@ -52,8 +52,8 @@ my $range = lc $query{'range'}; # lower case
unless(($origin =~ /^\w+?\.cgi$/) && ($graph =~ /^[\w\-.,; ]+?$/) && ($range ~~ @Graphs::time_ranges)) {
# Send HTTP headers
_start_svg_output();
-
- _print_error("URL parameters missing or malformed.");
+
+ _print_error("URL parameters missing or malformed.");
exit;
}
@@ -62,13 +62,13 @@ unless(($origin =~ /^\w+?\.cgi$/) && ($graph =~ /^[\w\-.,; ]+?$/) && ($range ~~
unless(($origin ~~ @supported_origins) || ($origin eq "getrrdimage.cgi")) {
# Rewrite to old URL format: /[graph origin cgi]?[graph name]?[time range]
my $location = "https://$ENV{'SERVER_NAME'}:$ENV{'SERVER_PORT'}/cgi-bin/${origin}?${graph}?${range}";
-
+
# Send HTTP redirect
print "Status: 302 Found\n";
print "Location: $location\n";
print "Content-type: text/html; charset=UTF-8\n";
print "\n"; # End of HTTP headers
-
+
print "Unsupported origin, request redirected to '$location'";
exit;
}
diff --git a/html/cgi-bin/gpl.cgi b/html/cgi-bin/gpl.cgi
index 140fd2178..029b048e8 100644
--- a/html/cgi-bin/gpl.cgi
+++ b/html/cgi-bin/gpl.cgi
@@ -57,7 +57,7 @@ print <
END
-;
+;
if ( -e "/usr/share/doc/licenses/GPLv3" ) {
print '
-
+
END
;
diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi
index 8faf4490c..0111a240b 100644
--- a/html/cgi-bin/proxy.cgi
+++ b/html/cgi-bin/proxy.cgi
@@ -3606,7 +3606,7 @@ END
print ASNBLFILE</dev/null");
}
else {
diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
index e69dc425a..109fc3e3e 100644
--- a/html/cgi-bin/routing.cgi
+++ b/html/cgi-bin/routing.cgi
@@ -49,7 +49,7 @@ $settings{'IP'} = '';
$settings{'GATEWAY'} = '';
$settings{'REMARK'} = '';
my @nosaved=('EN','IP','GATEWAY','REMARK'); # List here ALL setting2 fields. Mandatory
-
+
$settings{'ACTION'} = ''; # add/edit/remove
$settings{'KEY1'} = ''; # point record for ACTION
@@ -105,14 +105,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
$temp[0] = $temp[0] ne '' ? '' : 'on'; # Toggle the field
@current[$settings{'KEY1'}] = join (',',@temp)."\n";
$settings{'KEY1'} = ''; # End edit mode
-
+
&General::log($Lang::tr{'routing config changed'});
#Save current
open(FILE, ">$datafile") or die 'routing datafile error';
print FILE @current;
close(FILE);
-
+
# Rebuild configuration file
&BuildConfiguration;
}
@@ -174,7 +174,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
# Write changes to config file.
&SortDataFile; # sort newly added/modified entry
&BuildConfiguration; # then re-build routing
-
+
#map ($settings{$_}='' ,@nosaved); # Clear fields
}
}
@@ -192,7 +192,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'edit'}) {
}
if ($settings{'ACTION'} eq $Lang::tr{'remove'}) {
- splice (@current,$settings{'KEY1'},1); # Delete line
+ splice (@current,$settings{'KEY1'},1); # Delete line
open(FILE, ">$datafile") or die 'route datafile error';
print FILE @current;
close(FILE);
@@ -315,7 +315,7 @@ foreach my $line (@current) {
$gdesc = $Lang::tr{'click to disable'};
} else {
$gif = 'off.gif';
- $gdesc = $Lang::tr{'click to enable'};
+ $gdesc = $Lang::tr{'click to enable'};
}
#Colorize each line
@@ -405,7 +405,7 @@ if ( $output != "" ) {
sub SortDataFile
{
our %entries = ();
-
+
# Sort pair of record received in $a $b special vars.
# When IP is specified use numeric sort else alpha.
# If sortname ends with 'Rev', do reverse sort.
@@ -449,13 +449,13 @@ sub SortDataFile
# Build a pair 'Field Name',value for each of the data dataline.
# Each SORTABLE field must have is pair.
# Other data fields (non sortable) can be grouped in one
-
+
my @record = ('KEY',$key++,'EN',$temp[0],'IP',$temp[1],'GATEWAY',$temp[2],'REMARK',$temp[3]);
my $record = {}; # create a reference to empty hash
%{$record} = @record; # populate that hash with @record
$entries{$record->{KEY}} = $record; # add this to a hash of hashes
}
-
+
open(FILE, ">$datafile") or die 'routing datafile error';
# Each field value is printed , with the newline ! Don't forget separator and order of them.
diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi
index 9289b4519..0a3cd8c04 100644
--- a/html/cgi-bin/samba.cgi
+++ b/html/cgi-bin/samba.cgi
@@ -142,7 +142,7 @@ if ($sambasettings{'ACTION'} eq $Lang::tr{'save'}) {
}
&General::readhash("${General::swroot}/samba/settings", \%sambasettings);
-
+
if ($errormessage)
{
@@ -759,7 +759,7 @@ sub isrunning
{
if (/^Name:\W+(.*)/)
{
- $testcmd = $1;
+ $testcmd = $1;
}
}
close FILE;
@@ -775,7 +775,7 @@ sub isrunning
sub writeconfiguration() {
open (FILE, ">${General::swroot}/samba/global") or die "Can't save the global settings: $!";
flock (FILE, 2);
-
+
print FILE <";
diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi
index 629f8ca0e..fb3959457 100644
--- a/html/cgi-bin/updatexlrator.cgi
+++ b/html/cgi-bin/updatexlrator.cgi
@@ -80,7 +80,7 @@ my @vendors=();
my %vendorstats=();
my $repository = "/var/updatecache/";
-my $webhome = "/srv/web/ipfire/html";
+my $webhome = "/srv/web/ipfire/html";
my $hintcolour = '#FFFFCC';
my $colourgray = '#808080';
diff --git a/html/cgi-bin/urlfilter.cgi b/html/cgi-bin/urlfilter.cgi
index 3a28721a9..1e54372f1 100644
--- a/html/cgi-bin/urlfilter.cgi
+++ b/html/cgi-bin/urlfilter.cgi
@@ -2954,10 +2954,10 @@ sub writeconfigfile
foreach $category (@categories) {
$blacklist = $category;
$category =~ s/\//_/g;
-
+
if ( $filtersettings{"FILTER_".uc($category)} ne "on" ){
my $constraintrule = "false";
-
+
foreach (@tclist){
chomp;
@tc = split(/\,/);
@@ -2966,12 +2966,12 @@ sub writeconfigfile
$constraintrule = "true";
}
}
-
+
if ( $constraintrule eq "false"){
next;
}
}
-
+
print FILE "dest $category {\n";
if (-e "$dbdir/$blacklist/domains") {
print FILE " domainlist $blacklist\/domains\n";
diff --git a/html/cgi-bin/vulnerabilities.cgi b/html/cgi-bin/vulnerabilities.cgi
index 926f043b8..5dfd344f2 100644
--- a/html/cgi-bin/vulnerabilities.cgi
+++ b/html/cgi-bin/vulnerabilities.cgi
@@ -239,7 +239,7 @@ sub check_status($) {
if ($status =~ /^(Vulnerable|Mitigation): (.*)$/) {
return ($1, $2);
- }
+ }
return $status;
}
diff --git a/html/cgi-bin/wakeonlan.cgi b/html/cgi-bin/wakeonlan.cgi
index 164cec2de..c3c4c6911 100644
--- a/html/cgi-bin/wakeonlan.cgi
+++ b/html/cgi-bin/wakeonlan.cgi
@@ -86,7 +86,7 @@ if ( $cgiparams{'ACTION'} eq 'add' )
unless( &General::validmac($cgiparams{'CLIENT_MAC'}) )
{
- $errormessage = $Lang::tr{'invalid mac address'};
+ $errormessage = $Lang::tr{'invalid mac address'};
goto ADDEXIT;
}
@@ -122,7 +122,7 @@ if ( $cgiparams{'ACTION'} eq 'update' )
unless( &General::validmac($cgiparams{'CLIENT_MAC'}) )
{
- $errormessage = $Lang::tr{'invalid mac address'};
+ $errormessage = $Lang::tr{'invalid mac address'};
goto UPDATEEXIT;
}
@@ -241,11 +241,11 @@ END
;
print "