This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 617bb64f6315b93f7b6dbbe7304ae634ca4fad78 (commit) via 0b4618f9a3817e6d2c76a96b0db00f50fc8e0b57 (commit) via dcc2f7e0f2887e6c15e29971a4d27ecccac884f4 (commit) from de6ef4d40adec7e1093b73c4397f042e830db15e (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 617bb64f6315b93f7b6dbbe7304ae634ca4fad78 Author: Peter Müller peter.mueller@ipfire.org Date: Sat Jun 25 09:15:17 2022 +0000
Core Update 169: Ship general-functions.pl
Signed-off-by: Peter Müller peter.mueller@ipfire.org
commit 0b4618f9a3817e6d2c76a96b0db00f50fc8e0b57 Author: Adolf Belka adolf.belka@ipfire.org Date: Fri Jun 24 23:58:57 2022 +0200
general-functions.pl: Fix for bug #12865 - Static IP address pools - Add network - Name wit>
- 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. This allows letters, upper and lower case, numbers, spaces and dashes
Fixes: Bug #12865 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org
commit dcc2f7e0f2887e6c15e29971a4d27ecccac884f4 Author: Adolf Belka adolf.belka@ipfire.org Date: Fri Jun 24 23:58:56 2022 +0200
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 adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/cfgroot/general-functions.pl | 15 +++++++++++++++ config/rootfiles/core/169/filelists/files | 1 + html/cgi-bin/ovpnmain.cgi | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-)
Difference in files: diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 6f49585dc..16a05cecf 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -721,6 +721,21 @@ sub validhostname return 1; }
+sub validccdname +{ + # Checks a ccdname for letters, numbers and spaces + my $ccdname = $_[0]; + + # ccdname should be at least one character in length + # but no more than 63 characters + if (length ($ccdname) < 1 || length ($ccdname) > 63) { + return 0;} + # Only valid characters are a-z, A-Z, 0-9, space and - + if ($ccdname !~ /^[a-zA-Z0-9 -]*$/) { + return 0;} + return 1; +} + sub validdomainname { my $part; diff --git a/config/rootfiles/core/169/filelists/files b/config/rootfiles/core/169/filelists/files index c5dee1e28..de0b40e8b 100644 --- a/config/rootfiles/core/169/filelists/files +++ b/config/rootfiles/core/169/filelists/files @@ -220,6 +220,7 @@ srv/web/ipfire/html/images/qr-code.png srv/web/ipfire/html/images/qr-code.svg srv/web/ipfire/html/themes/ipfire/include/functions.pl usr/sbin/setup +var/ipfire/general-functions.pl var/ipfire/header.pl var/ipfire/main/manualpages var/ipfire/suricata/ruleset-sources diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 736d17541..90d3710e4 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;
hooks/post-receive -- IPFire 2.x development tree