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 4cXWKw75Nxz339P for ; Thu, 25 Sep 2025 11:13:24 +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 4cXWKn71Ncz333s for ; Thu, 25 Sep 2025 11:13:17 +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 4cXWKn0FN8z3wP; Thu, 25 Sep 2025 11:13:17 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1758798797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FXKuA5a+Z0WRSsm4/fAYqd9pEkLEwVra0Gj7VlS3ZIs=; b=Xh+8qeZgU+xUfugfU7GpOV0yV1Fs1nbJeMpLBqnRbmMiJ/htLI87rlroOwFg8nln849yqh 600hh9CyvBvFsaAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1758798797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FXKuA5a+Z0WRSsm4/fAYqd9pEkLEwVra0Gj7VlS3ZIs=; b=MniRUh5bxGGgKJw2fkjmNPqJ1afGLCVMYAW7WClJNd1TkUVPjf8DkT9jecsGTCRtVr7W4o lovlShsLbo5SykIF+hnPdtZYfWxi/aTaUN9aIARKlnQRpZjhOw3VoZ/4qpgmG0EkGF28+l pgBMx8DcGwjUzCoqPqg25GGhoU5fq/poA+z2iX6pOh/eL5cB5nvdcY10N+Q96Jzg4G0s0X 7Jxc8ARn6VaFL48vZ7TtEKL7tQpp3l6g/y5Mb3gSEiqeaUcKZDVeZEEYVW52SG3MJRQB1x zY4E7irJ0OHs+IaPgIk/O3h1aLUlP0Jw+6V/vl8gHlrtgIxdOdbjh8VyGbLnGQ== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 10/16] calamaris.dat: Fixes bug 13886 Date: Thu, 25 Sep 2025 13:12:46 +0200 Message-ID: <20250925111252.11893-10-adolf.belka@ipfire.org> In-Reply-To: <20250925111252.11893-1-adolf.belka@ipfire.org> References: <20250925111252.11893-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fixes: bug 13886 - calamaris.dat Multiple Parameters Command Injection Signed-off-by: Adolf Belka --- html/cgi-bin/logs.cgi/calamaris.dat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/cgi-bin/logs.cgi/calamaris.dat b/html/cgi-bin/logs.cgi/calamaris.dat index dcc812e47..1c8e4b68e 100644 --- a/html/cgi-bin/logs.cgi/calamaris.dat +++ b/html/cgi-bin/logs.cgi/calamaris.dat @@ -170,6 +170,10 @@ if ($reportsettings{'ACTION'} eq $Lang::tr{'calamaris create report'}) if ($reportsettings{'RUN_BACKGROUND'} eq 'on') { $commandline.=" &"; } + if (!($commandline =~ /^[a-zA-Z0-9-\s]+$/)) + { + die "Invalid input in\"$commandline\""; + } system("${General::swroot}/proxy/calamaris/bin/mkreport $commandline") } -- 2.51.0