From: Adolf Belka Date: Fri, 24 Jun 2022 21:58:56 +0000 (+0200) Subject: ovpnmain.cgi: Fix for bug #12865 - Static IP address pools - Add network - Name with... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dcc2f7e0f2887e6c15e29971a4d27ecccac884f4;p=people%2Fstevee%2Fipfire-2.x.git ovpnmain.cgi: Fix for bug #12865 - Static IP address pools - Add network - Name with space - The fix for bug #12428 removed spaces from the validhostname subroutine as hostnames are not supposed to have spaces - This resulted in spaces no longer being allowed for the Static IP Address Pools names - New subroutine created called validccdname in general-functions.pl Fixes: Bug #12865 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 736d175410..90d3710e41 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -473,7 +473,7 @@ sub addccdnet return } - if(!&General::validhostname($ccdname)) + if(!&General::validccdname($ccdname)) { $errormessage=$Lang::tr{'ccd err invalidname'}; return;