From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] fwhosts.cgi: Fixes bug#13206 - no validation of location group name Date: Wed, 02 Aug 2023 22:09:55 +0200 Message-ID: <20230802200955.4802-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2184031726443005970==" List-Id: --===============2184031726443005970== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - Added validation code for the location group name. This is only validated w= hen edited and not when created. - The code was copied from the section for creating the Services Group Name o= r the Network/Host Group Name. Fixes: Bug#13206 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/fwhosts.cgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index baf745a0a..d6be6c40e 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -693,6 +693,9 @@ if ($fwhostsettings{'ACTION'} eq 'savelocationgrp') &General::readhasharray("$fwconfiginp", \%fwinp); &General::readhasharray("$fwconfigout", \%fwout); =20 + # Check name + if (!&validhostname($grp)){$errormessage.=3D$Lang::tr{'fwhost err name'};} + # Check for existing group name. if (!&checkgroup($grp) && $fwhostsettings{'update'} ne 'on'){ $errormessage =3D $Lang::tr{'fwhost err grpexist'}; --=20 2.41.0 --===============2184031726443005970==--