]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
fwhosts.cgi: Escape PROT in the right place
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Sep 2025 15:05:32 +0000 (17:05 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Sep 2025 15:34:44 +0000 (17:34 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/fwhosts.cgi

index dd0200a8ed3ba7736bda23611c3625b7c54d600f..dca425b692f9c5f74fa6776e83da98a29ef26d7e 100644 (file)
@@ -800,7 +800,7 @@ if ($fwhostsettings{'ACTION'} eq 'saveservice')
                foreach my $i (0 .. 4) { $customservice{$key}[$i] = "";}
                $customservice{$key}[0] = $fwhostsettings{'SRV_NAME'};
                $customservice{$key}[1] = $fwhostsettings{'SRV_PORT'};
-               $customservice{$key}[2] = &Header::escape($fwhostsettings{'PROT'});
+               $customservice{$key}[2] = $fwhostsettings{'PROT'};
                $customservice{$key}[3] = $ICMP;
                &General::writehasharray("$configsrv", \%customservice );
                #reset fields
@@ -1783,7 +1783,7 @@ sub addservice
        {
                $fwhostsettings{'oldsrvname'} = $fwhostsettings{'SRV_NAME'};
                $fwhostsettings{'oldsrvport'} = $fwhostsettings{'SRV_PORT'};
-               $fwhostsettings{'oldsrvprot'} = $fwhostsettings{'PROT'};
+               $fwhostsettings{'oldsrvprot'} = &Header::escape($fwhostsettings{'PROT'});
                $fwhostsettings{'oldsrvicmp'} = $fwhostsettings{'ICMP'};
        }
        print<<END;