mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 20:16:49 +02:00
fwhosts.cgi: Fixes bug#13206 - no validation of location group name
- Added validation code for the location group name. This is only validated when edited and not when created. - The code was copied from the section for creating the Services Group Name or the Network/Host Group Name. Fixes: Bug#13206 Tested-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> Reviewed-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
357984289d
commit
d4c30a95e7
@@ -693,6 +693,9 @@ if ($fwhostsettings{'ACTION'} eq 'savelocationgrp')
|
||||
&General::readhasharray("$fwconfiginp", \%fwinp);
|
||||
&General::readhasharray("$fwconfigout", \%fwout);
|
||||
|
||||
# Check name
|
||||
if (!&validhostname($grp)){$errormessage.=$Lang::tr{'fwhost err name'};}
|
||||
|
||||
# Check for existing group name.
|
||||
if (!&checkgroup($grp) && $fwhostsettings{'update'} ne 'on'){
|
||||
$errormessage = $Lang::tr{'fwhost err grpexist'};
|
||||
|
||||
Reference in New Issue
Block a user