public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH 01/16] fwhosts.cgi Fix for bug 13876 & bug 13877
@ 2025-09-25 11:12 Adolf Belka
  2025-09-25 11:12 ` [PATCH 02/16] ids.cgi: Fixes bug 13878 Adolf Belka
                   ` (15 more replies)
  0 siblings, 16 replies; 24+ messages in thread
From: Adolf Belka @ 2025-09-25 11:12 UTC (permalink / raw)
  To: development; +Cc: Adolf Belka

Fixes: Bug 13876 savelocationgrp COUNTRY_CODE Stored Cross-Site Scripting
Fixes: Bug 13877 saveservice PROT Stored Cross-Site Scripting
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/fwhosts.cgi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi
index 953f81e5f..a666969b0 100644
--- a/html/cgi-bin/fwhosts.cgi
+++ b/html/cgi-bin/fwhosts.cgi
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2013 Alexander Marx <amarx@ipfire.org>                        #
+# Copyright (C) 2013-2025  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -714,7 +714,7 @@ if ($fwhostsettings{'ACTION'} eq 'savelocationgrp')
 	}
 
 	if ($fwhostsettings{'update'} eq 'on'){
-		@target=$fwhostsettings{'COUNTRY_CODE'};
+		@target=&Header::escape($fwhostsettings{'COUNTRY_CODE'});
 		$type='Location Group';
 
 		#check if host/net exists in grp
@@ -796,7 +796,7 @@ if ($fwhostsettings{'ACTION'} eq 'saveservice')
 		foreach my $i (0 .. 4) { $customservice{$key}[$i] = "";}
 		$customservice{$key}[0] = $fwhostsettings{'SRV_NAME'};
 		$customservice{$key}[1] = $fwhostsettings{'SRV_PORT'};
-		$customservice{$key}[2] = $fwhostsettings{'PROT'};
+		$customservice{$key}[2] = &Header::escape($fwhostsettings{'PROT'});
 		$customservice{$key}[3] = $ICMP;
 		&General::writehasharray("$configsrv", \%customservice );
 		#reset fields
-- 
2.51.0



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

end of thread, other threads:[~2025-09-25 13:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-25 11:12 [PATCH 01/16] fwhosts.cgi Fix for bug 13876 & bug 13877 Adolf Belka
2025-09-25 11:12 ` [PATCH 02/16] ids.cgi: Fixes bug 13878 Adolf Belka
2025-09-25 12:51   ` Bernhard Bitsch
2025-09-25 11:12 ` [PATCH 03/16] ovpnclients.dat: Fixes bug 13879 Adolf Belka
2025-09-25 12:56   ` Bernhard Bitsch
2025-09-25 11:12 ` [PATCH 04/16] header.pl: Fixes bug 13880 Adolf Belka
2025-09-25 13:21   ` Bernhard Bitsch
2025-09-25 11:12 ` [PATCH 05/16] firewalllogip.dat: Fixes bug 13881 Adolf Belka
2025-09-25 13:36   ` Bernhard Bitsch
2025-09-25 11:12 ` [PATCH 06/16] firewalllogcountry.dat: Fixes bug 13882 Adolf Belka
2025-09-25 13:40   ` Bernhard Bitsch
2025-09-25 11:12 ` [PATCH 07/16] time.cgi: Fixes bug 13883 Adolf Belka
2025-09-25 13:45   ` Bernhard Bitsch
2025-09-25 11:12 ` [PATCH 08/16] ddns.cgi: Fixes bug 13884 Adolf Belka
2025-09-25 13:50   ` Bernhard Bitsch
2025-09-25 11:12 ` [PATCH 09/16] qos.cgi: Fixes bug 13885 Adolf Belka
2025-09-25 11:12 ` [PATCH 10/16] calamaris.dat: Fixes bug 13886 Adolf Belka
2025-09-25 11:12 ` [PATCH 11/16] urlfilter.cgi: Fixes bugs 13887, 13888 & 13889 Adolf Belka
2025-09-25 11:12 ` [PATCH 12/16] config.dat: Fixes bug 13890 Adolf Belka
2025-09-25 11:12 ` [PATCH 13/16] mail.cgi: Fixes bug 13891 Adolf Belka
2025-09-25 11:12 ` [PATCH 14/16] dns.cgi: Fixes bug 13892 Adolf Belka
2025-09-25 11:12 ` [PATCH 15/16] proxy.cgi: Fixes bug 13893 Adolf Belka
2025-09-25 11:12 ` [PATCH 16/16] proxy.cgi: Further fix for " Adolf Belka
2025-09-25 12:47 ` [PATCH 01/16] fwhosts.cgi Fix for bug 13876 & bug 13877 Bernhard Bitsch

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