public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, master, updated. b62601c931bff898c8c9b460d3d3504225d8899d
@ 2026-11-01 14:15 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2026-11-01 14:15 UTC (permalink / raw)
  To: ipfire-scm

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, master has been updated
       via  b62601c931bff898c8c9b460d3d3504225d8899d (commit)
       via  14752fefe70a56b507abcd2b1b78d843d7279a23 (commit)
       via  ab76bd4e4678bdaa0761f04036cac02b808f3e76 (commit)
       via  61e5b1eb5a7a1d3174d3136dae80e8cc1e913061 (commit)
       via  117eee75a86c3ed6ebd507e648a69473fb098934 (commit)
       via  c990f332e2a2d74326570eec1d06fc9fdf9e4493 (commit)
      from  ebfab1f333f2a9f3f6109852c28b86b8231d2734 (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 b62601c931bff898c8c9b460d3d3504225d8899d
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Nov 1 14:11:56 2026 +0000

    dhcp.cgi: Fix the host name and the event handler conditions
    
    config-option-host-name is not valid syntax, so the host name that is
    configured for a static lease was never used. Prefer it over the name
    that is sent by the client.
    
    dhcpd writes "not (...)" without the parenthesis into the leases file
    and cannot read it back afterwards. Avoid the negation.
    
    Fixes: #14770
    Fixes: #14772
    Signed-off-by: Michael Tremer <michael.tremer@lightningwirelabs.com>

commit 14752fefe70a56b507abcd2b1b78d843d7279a23
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Nov 1 14:11:56 2026 +0000

    dhcp-lease: Ignore addresses that are listed more than once
    
    If an address is both leased and configured statically, or configured
    statically more than once, inserting it into the temporary table failed
    because of the primary key and the cleanup was aborted.
    
    Fixes: #14771
    Signed-off-by: Michael Tremer <michael.tremer@lightningwirelabs.com>

commit ab76bd4e4678bdaa0761f04036cac02b808f3e76
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Nov 1 14:11:56 2026 +0000

    ids.cgi: Validate each mail address instead of the whole string
    
    The loop checked $address rather than $addr, so only the complete
    input was ever matched against the pattern.
    
    Fixes: #14774
    Signed-off-by: Michael Tremer <michael.tremer@lightningwirelabs.com>

commit 61e5b1eb5a7a1d3174d3136dae80e8cc1e913061
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Nov 1 14:11:56 2026 +0000

    ids.cgi: Fix typo in the name of the monthly report setting
    
    Fixes: #14773
    Signed-off-by: Michael Tremer <michael.tremer@lightningwirelabs.com>

commit 117eee75a86c3ed6ebd507e648a69473fb098934
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Nov 1 14:11:56 2026 +0000

    lang.pl: Do not call uc() on an undefined country
    
    FindWebLanguage() raised a warning for every language code without a
    country, because $2 was undefined.
    
    Fixes: #14769
    Signed-off-by: Michael Tremer <michael.tremer@lightningwirelabs.com>

commit c990f332e2a2d74326570eec1d06fc9fdf9e4493
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Nov 1 14:11:16 2026 +0000

    ids.cgi: Show labels for IPsec, WireGuard and OpenVPN
    
    Zones without a translation got an empty label. Add the missing names
    and fall back to the upper case zone name for anything else.
    
    Fixes: #14767
    Signed-off-by: Michael Tremer <michael.tremer@lightningwirelabs.com>

-----------------------------------------------------------------------

Summary of changes:
 config/cfgroot/lang.pl          |  2 +-
 config/knot-resolver/dhcp-lease |  2 +-
 html/cgi-bin/dhcp.cgi           | 12 ++++++++----
 html/cgi-bin/ids.cgi            | 11 ++++++++---
 4 files changed, 18 insertions(+), 9 deletions(-)

Difference in files:
diff --git a/config/cfgroot/lang.pl b/config/cfgroot/lang.pl
index 0a3a8af0ab..cd1419552a 100644
--- a/config/cfgroot/lang.pl
+++ b/config/cfgroot/lang.pl
@@ -145,7 +145,7 @@ sub FindWebLanguage() {
 	# Split language, country and drop the encoding
 	if ($lang =~ m/^([A-Za-z]{2,3})(?:[_\-]([A-Za-z]{2}))?(?:\..*)?$/) {
 		my $language = lc($1);
-		my $country = uc($2);
+		my $country = uc($2 // "");
 
 		return $locales{$language} if (exists $locales{$language} && !$country);
 		return ($country) ? "${language}_${country}" : $language;
diff --git a/config/knot-resolver/dhcp-lease b/config/knot-resolver/dhcp-lease
index 4c285a551d..10b5c12d98 100644
--- a/config/knot-resolver/dhcp-lease
+++ b/config/knot-resolver/dhcp-lease
@@ -192,7 +192,7 @@ main() {
 			while read -r address; do
 				[[ ${address} =~ ^[0-9]{1,3}(\.[0-9]{1,3}){3}$ ]] || continue
 
-				statements+="INSERT INTO keep(address) VALUES('${address}');"$'\n'
+				statements+="INSERT OR IGNORE INTO keep(address) VALUES('${address}');"$'\n'
 			done < <(active_addresses)
 
 			if ! sqlite3 "${DB_PATH}" <<-EOF
diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi
index 6f90bebf18..c1b1e9ea20 100644
--- a/html/cgi-bin/dhcp.cgi
+++ b/html/cgi-bin/dhcp.cgi
@@ -1584,13 +1584,15 @@ on commit {
 		"ADDRESS=",
 		binary-to-ascii(10, 8, ".", leased-address)
 	);
-	set ClientHostName = pick-first-value(option host-name, config-option-host-name, client-name, "");
+	set ClientHostName = pick-first-value(config-option host-name, option host-name, client-name, "");
 	set ClientDomainName = concat(
 		"DOMAINNAME=",
 		pick-first-value(config-option domain-name, "")
 	);
 
-	if not (ClientHostName = "") {
+	if (ClientHostName = "") {
+		# Nothing to do
+	} else {
 		execute("/usr/sbin/dhcp-lease", "commit", ClientAddress, concat("HOSTNAME=", ClientHostName), ClientDomainName);
 	}
 }
@@ -1600,13 +1602,15 @@ on release {
 		"ADDRESS=",
 		binary-to-ascii(10, 8, ".", leased-address)
 	);
-	set ClientHostName = pick-first-value(option host-name, config-option-host-name, client-name, "");
+	set ClientHostName = pick-first-value(config-option host-name, option host-name, client-name, "");
 	set ClientDomainName = concat(
 		"DOMAINNAME=",
 		pick-first-value(config-option domain-name, "")
 	);
 
-	if not (ClientHostName = "") {
+	if (ClientHostName = "") {
+		# Nothing to do
+	} else {
 		execute("/usr/sbin/dhcp-lease", "release", ClientAddress, concat("HOSTNAME=", ClientHostName), ClientDomainName);
 	}
 }
diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi
index e6216e7e3b..e7529bc353 100644
--- a/html/cgi-bin/ids.cgi
+++ b/html/cgi-bin/ids.cgi
@@ -576,7 +576,7 @@ if ($cgiparams{'RULESET'} eq _('Apply')) {
 
 	# Check if the e-mail feature should be used.
 	if (($cgiparams{'ENABLE_EMAIL'} eq "on") || ($cgiparams{'ENABLE_REPORT_DAILY'} eq "on") ||
-	    ($cgiparams{'ENABLE_REPORT_WEEKLY'} eq "on") || ($cgiparams{'ENABLE_REPORT_MONTLY'} eq "on")) {
+	    ($cgiparams{'ENABLE_REPORT_WEEKLY'} eq "on") || ($cgiparams{'ENABLE_REPORT_MONTHLY'} eq "on")) {
 		# Check if a sender mail address has been provided.
 		unless($cgiparams{'EMAIL_SENDER'}) {
 			$errormessage = _('No Sender Email Address Specified');
@@ -1140,8 +1140,13 @@ END
 				'blue'   => _('BLUE'),
 				'orange' => _('ORANGE'),
 				'red'    => _('RED'),
+				'ipsec'  => _('IPsec'),
+				'wg'     => _('WireGuard'),
+				'ovpn'   => _('OpenVPN'),
 			);
-			my $zone_name = $zone_names{$zone};
+
+			# Get the translated zone name (with fallback)
+			my $zone_name = $zone_names{$zone} || $zone_upper;
 
 			# Grab checkbox status from settings hash.
 			if ($idssettings{"ENABLE_IDS_$zone_upper"} eq "on") {
@@ -2326,7 +2331,7 @@ sub _validate_mail_address($) {
 	foreach my $addr (@temp) {
 		# If the address contains a '@' with at least one character before and after,
 		# we consider it valid.
-		return 1 unless ($address =~ m/.@./);
+		return 1 unless ($addr =~ m/.@./);
 	}
 
 	# Return nothing if the address is valid.


hooks/post-receive
--
IPFire 2.x development tree


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-01 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-01 14:15 [git.ipfire.org] IPFire 2.x development tree branch, master, updated. b62601c931bff898c8c9b460d3d3504225d8899d Michael Tremer

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