]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
firewall.cgi: Make checked and selected hashes private for each single function.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 11 Jul 2021 17:54:18 +0000 (19:54 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 2 Sep 2021 08:56:56 +0000 (08:56 +0000)
Some functions uses those two hashes and are altering them - making them
private will erase and fill it with new data.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
html/cgi-bin/firewall.cgi

index 8d6adee966fafb2b2b37642fdea34b5fc0ad58c7..0eace5f1130caa2b3354df55109537ac1e40726d 100644 (file)
@@ -1005,6 +1005,10 @@ sub gen_dd_block
        my $grp=shift;
        my $helper='';
        my $show='';
+
+       my %checked = ();
+       my %selected = ();
+
        $checked{'grp1'}{$fwdfwsettings{'grp1'}}                                = 'CHECKED';
        $checked{'grp2'}{$fwdfwsettings{'grp2'}}                                = 'CHECKED';
        $checked{'grp3'}{$fwdfwsettings{'grp3'}}                                = 'CHECKED';
@@ -1482,7 +1486,10 @@ sub newrule
        &General::readhasharray("$configlocationgrp", \%customlocationgrp);
        &General::readhasharray("$configipsec", \%ipsecconf);
        &General::get_aliases(\%aliases);
-       my %checked=();
+
+       my %checked = ();
+       my %selected = ();
+
        my $helper;
        my $sum=0;
        if($fwdfwsettings{'config'} eq ''){$fwdfwsettings{'config'}=$configfwdfw;}