From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4cXZc24ghpz2xph for ; Thu, 25 Sep 2025 13:40:50 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R13" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4cXZbz1cjtz2xM3 for ; Thu, 25 Sep 2025 13:40:47 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4cXZby5dBmzct for ; Thu, 25 Sep 2025 13:40:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1758807646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i/G8fYxbmJAukzGlQbOq92T68ESqewhvYmjAx7tfMcI=; b=O4Z3F8HhQhUuY6vomF29iNPdBb4S6ezo53d1HUHu89Sq+YIdZvSg5KwYCYreiOA3xO94kU Q0MQZMM1OmEiVgitqDijk/oIH05lsVSbfruGQ2tDbUjg28Z0mCAiQ1eLUR//ri9U3LvmbC rD/Wd99BKBoItUpMTCQDnJYPKhrEjiPf2+b9nKKQ+7ZLpE+WdjruJZF7S6nmFofLRF2EnF GEE5s6qj5MX9777RF6ZkVhmSPL0udKkHb6MqRkPfMytCNkneekFODxDoBFpzXyt5T3HyRM +/pGOP2tLHaBzjN/sECKLIQiQ8lkvco6Llac0jUCiYfCYtjyS4J1R6m4NO42Qw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1758807646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i/G8fYxbmJAukzGlQbOq92T68ESqewhvYmjAx7tfMcI=; b=QOFvwyxykBjJNvpteowbtOxf9OCgYShwoD53ORn0VpIIva+nAQWsqQX3FGZiBgHZARmDmZ HkBChq9XK8KFC5Dg== Message-ID: <780333c6-4920-44b3-9059-f6e92e38cd1e@ipfire.org> Date: Thu, 25 Sep 2025 15:40:45 +0200 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Subject: Re: [PATCH 06/16] firewalllogcountry.dat: Fixes bug 13882 To: development@lists.ipfire.org References: <20250925111252.11893-1-adolf.belka@ipfire.org> <20250925111252.11893-6-adolf.belka@ipfire.org> Content-Language: en-GB From: Bernhard Bitsch In-Reply-To: <20250925111252.11893-6-adolf.belka@ipfire.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reviewed-by: Bernhard Bitsch Am 25.09.2025 um 13:12 schrieb Adolf Belka: > Fixes: bug 13882 - firewalllogcountry.dat pienumber Stored Cross-Site Scripting > Signed-off-by: Adolf Belka > --- > html/cgi-bin/logs.cgi/firewalllogcountry.dat | 31 +++++++++++++------- > 1 file changed, 20 insertions(+), 11 deletions(-) > > diff --git a/html/cgi-bin/logs.cgi/firewalllogcountry.dat b/html/cgi-bin/logs.cgi/firewalllogcountry.dat > index 4e998a567..b7fded9e3 100644 > --- a/html/cgi-bin/logs.cgi/firewalllogcountry.dat > +++ b/html/cgi-bin/logs.cgi/firewalllogcountry.dat > @@ -1,14 +1,23 @@ > #!/usr/bin/perl > -# > -# SmoothWall CGIs > -# > -# This code is distributed under the terms of the GPL > -# > -# JC HERITIER > -# page inspired from the initial firewalllog.dat > -# > -# Modified for IPFire by Christian Schmidt > -# and Michael Tremer (www.ipfire.org) > +############################################################################### > +# # > +# IPFire.org - A linux based firewall # > +# Copyright (C) 2007-2025 IPFire Team # > +# # > +# 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 # > +# the Free Software Foundation, either version 3 of the License, or # > +# (at your option) any later version. # > +# # > +# This program is distributed in the hope that it will be useful, # > +# but WITHOUT ANY WARRANTY; without even the implied warranty of # > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # > +# GNU General Public License for more details. # > +# # > +# You should have received a copy of the GNU General Public License # > +# along with this program. If not, see . # > +# # > +############################################################################### > > use strict; > use Getopt::Std; > @@ -61,7 +70,7 @@ if ($settings{'showpie'} != 0) { $cgiparams{'showpie'} = $settings{'showpie'} }; > if ($settings{'sortcolumn'} != 0) { $cgiparams{'sortcolumn'} = $settings{'sortcolumn'} }; > > &Header::getcgihash(\%cgiparams); > -if ($cgiparams{'pienumber'} != 0) { $settings{'pienumber'} = $cgiparams{'pienumber'} }; > +if ($cgiparams{'pienumber'} != 0) { $settings{'pienumber'} = &Header::escape($cgiparams{'pienumber'}) }; > if ($cgiparams{'otherspie'} != 0) { $settings{'otherspie'} = $cgiparams{'otherspie'} }; > if ($cgiparams{'showpie'} != 0) { $settings{'showpie'} = $cgiparams{'showpie'} }; > if ($cgiparams{'sortcolumn'} != 0) { $settings{'sortcolumn'} = $cgiparams{'sortcolumn'} };