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 4cXWKx0r9Rz377c for ; Thu, 25 Sep 2025 11:13:25 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (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 4cXWKq1NWHz3390 for ; Thu, 25 Sep 2025 11:13:19 +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 4cXWKn6lQzz41g; 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=1758798798; 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=2gtFf956VNq8sGe0c0SHZ+74sFr0DPOErQW7VAhacFw=; b=FKG/ymIUR0cM+UtrcsIlQaQpnF2q7SyLh0UX7tsZZFN1LG1EwZpCJ8bU+9vbbPhU5UunUS 5nq1H1JKLFjsS0DA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1758798798; 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=2gtFf956VNq8sGe0c0SHZ+74sFr0DPOErQW7VAhacFw=; b=VZe09kHrKBvDkoEgtLegEV7UK4xD9Rq4Qn0HEcSgz+qm69/bsduUgw41+C5M06/TNPyYUJ wWl2KcSGG2FiS1QF27WW6dwFSBP3qsQQJcgltdRIhCZTekpmFaRwuyjP3vMGWg0vFwnUcZ rKKhUZrKJIHOSxYBRMDIes+5HN10AHLJ2IobPBZu3BME3laxq4ShP/usIecWza+LDvtht9 go1Ze/LbS+pQeETmhue3DttVss6OCSbzbxQLIF7NAFBq/IygBHRYw4QWleGltOvi7Xd+kD L1pZWrYDw2PPB2r85zKbyc2a1F3+kQ6VoID8sXAIEyv6ji1whr7otDNqdUFKdQ== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 13/16] mail.cgi: Fixes bug 13891 Date: Thu, 25 Sep 2025 13:12:49 +0200 Message-ID: <20250925111252.11893-13-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 13891 - mail.cgi txt_mailuser txt_mailpass Stored Cross-Site Scripting Signed-off-by: Adolf Belka --- html/cgi-bin/mail.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/cgi-bin/mail.cgi b/html/cgi-bin/mail.cgi index 0ed3dfeca..aae4abc31 100644 --- a/html/cgi-bin/mail.cgi +++ b/html/cgi-bin/mail.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2020 IPFire Team # +# 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 # @@ -102,8 +102,8 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){ #SaveButton on configsite $mail{'RECIPIENT'} = $cgiparams{'txt_recipient'}; if ($cgiparams{'txt_mailuser'} && $cgiparams{'txt_mailpass'}) { - $auth{'AUTHNAME'} = $cgiparams{'txt_mailuser'}; - $auth{'AUTHPASS'} = $cgiparams{'txt_mailpass'}; + $auth{'AUTHNAME'} = &Header::escape($cgiparams{'txt_mailuser'}); + $auth{'AUTHPASS'} = &Header::escape($cgiparams{'txt_mailpass'}); $auth{'AUTHHOST'} = $cgiparams{'txt_mailserver'}; print TXT1 "$auth{'AUTHNAME'}|$auth{'AUTHHOST'}:$auth{'AUTHPASS'}\n"; } -- 2.51.0