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 4cXZVq182rz2yBF for ; Thu, 25 Sep 2025 13:36:19 +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 4cXZVl5SV1z2xM3 for ; Thu, 25 Sep 2025 13:36:15 +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) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4cXZVl05NWz2WJ for ; Thu, 25 Sep 2025 13:36:14 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1758807375; 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=AdSii5xf2NxvobaT+dB5bG1gIeCTmhb67XijsV3TbtM=; b=RssupzpUwpjNX5TtJdYIQ9RMUy0JqOfmOa1sovV0xuuSSvdNt+fm2glDLdN9OQc9R9YVDO wpEdVbZI2TE9mBAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1758807375; 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=AdSii5xf2NxvobaT+dB5bG1gIeCTmhb67XijsV3TbtM=; b=guArQb8wxZRrXz7GlAzf0dunqs6bJyqiG0p8y+aByc+6fCQjnGbwVfhLAANW2v4g0J/MNj MZA4RaOk4yHF2gcjjMfrgyQZigGddDcF+wwDWieUJRkQNXlTczVrln8Hi9K2zmibd/+L1Q 9yYo9VxHB96Jlt3zGJsHkljdAWIIMdfmwbYrY08wSXVaPcKUt0zKS3J95LH8l9K3ex/1vX eLd2FRDkL4OV7gEtbV5xAg/MaoUeLw0EJS/Rue8XhyLeIF9DXGsZJU5xY22wwMu9tgqLGz gSWWzzioEGnZUvYJW83QuNLgQ+cI5e5c+FHDUlvNLz0c3eI/0sW40TWqjWpQpw== Message-ID: Date: Thu, 25 Sep 2025 15:36:13 +0200 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Subject: Re: [PATCH 05/16] firewalllogip.dat: Fixes bug 13881 To: development@lists.ipfire.org References: <20250925111252.11893-1-adolf.belka@ipfire.org> <20250925111252.11893-5-adolf.belka@ipfire.org> Content-Language: en-GB From: Bernhard Bitsch In-Reply-To: <20250925111252.11893-5-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 13881 - firewalllogip.dat pienumber Stored Cross-Site Scripting > Signed-off-by: Adolf Belka > --- > html/cgi-bin/logs.cgi/firewalllogip.dat | 31 ++++++++++++++++--------- > 1 file changed, 20 insertions(+), 11 deletions(-) > > diff --git a/html/cgi-bin/logs.cgi/firewalllogip.dat b/html/cgi-bin/logs.cgi/firewalllogip.dat > index a7c6e5f80..361fe526d 100644 > --- a/html/cgi-bin/logs.cgi/firewalllogip.dat > +++ b/html/cgi-bin/logs.cgi/firewalllogip.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'} };