public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] core199: Ship general-functions.pl
@ 2025-11-17 17:30 Adolf Belka
  2025-11-17 17:30 ` [PATCH] fwhosts.cgi: Don't check Country Code when locationgrp initially created Adolf Belka
  0 siblings, 1 reply; 2+ messages in thread
From: Adolf Belka @ 2025-11-17 17:30 UTC (permalink / raw)
  To: development; +Cc: Adolf Belka

- This file was changed in CU198 but was not shipped so the changes were not included in
   CU198 updates.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/core/199/filelists/files | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config/rootfiles/core/199/filelists/files b/config/rootfiles/core/199/filelists/files
index 1a3e0b9c9..0d20bb165 100644
--- a/config/rootfiles/core/199/filelists/files
+++ b/config/rootfiles/core/199/filelists/files
@@ -27,6 +27,7 @@ usr/local/bin/lldpdctrl
 usr/sbin/openvpn-authenticator
 usr/sbin/redirect_wrapper
 var/ipfire/backup/include
+var/ipfire/general-functions.pl
 var/ipfire/header.pl
 var/ipfire/lldp
 var/ipfire/menu.d/30-network.menu
-- 
2.51.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] fwhosts.cgi: Don't check Country Code when locationgrp initially created
  2025-11-17 17:30 [PATCH] core199: Ship general-functions.pl Adolf Belka
@ 2025-11-17 17:30 ` Adolf Belka
  0 siblings, 0 replies; 2+ messages in thread
From: Adolf Belka @ 2025-11-17 17:30 UTC (permalink / raw)
  To: development; +Cc: Adolf Belka

- When a location group is initially created the Country Code variable is blank. This
   causes an error message that the Country Code is invalid before any country code
   has been selected. This was flagged up by a new forum member.
- This change only checks the Country Code variable for being valid if it is not blank
- If this is not the best way to fix this problem, feel free to modify or replace it.
- Tested as working on my vm testbed.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/fwhosts.cgi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi
index 7820523c5..684b18794 100644
--- a/html/cgi-bin/fwhosts.cgi
+++ b/html/cgi-bin/fwhosts.cgi
@@ -703,8 +703,10 @@ if ($fwhostsettings{'ACTION'} eq 'savelocationgrp')
 	# Check name
 	if (!&validhostname($grp)){$errormessage.=$Lang::tr{'fwhost err name'};}
 
-	unless (&General::validcc($fwhostsettings{'COUNTRY_CODE'})) {
-		$errormessage = $Lang::tr{'fwhost invalid country code'};
+	if ($fwhostsettings{'COUNTRY_CODE'} ne ''){
+		unless (&General::validcc($fwhostsettings{'COUNTRY_CODE'})) {
+			$errormessage = $Lang::tr{'fwhost invalid country code'};
+		}
 	}
 
 	# Check for existing group name.
-- 
2.51.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-17 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-17 17:30 [PATCH] core199: Ship general-functions.pl Adolf Belka
2025-11-17 17:30 ` [PATCH] fwhosts.cgi: Don't check Country Code when locationgrp initially created Adolf Belka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox