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 4cXWKx0mjrz377Z 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 4cXWKq2k51z3336 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 4cXWKp1Z2mz42N; Thu, 25 Sep 2025 11:13:18 +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=0PKJLA+jB2U8GoZqorXhUy1aACRYsZzNs4hNMS9mBPU=; b=YdYg3bBxXE2V1I2r7PArqFDRm4c0DWCDJTTaEuyw70xClzyNLPBlEPovis6nTbCjpQmd8z /tsQfGuPPc1mc6Dw== 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=0PKJLA+jB2U8GoZqorXhUy1aACRYsZzNs4hNMS9mBPU=; b=Ypudk6bWCyI40J/Q6Piy2Dzny2DsZsmYMpSje9FpuUTCHO9Dfb01k6Bj7bX044Xiweb4MW +1CuVO+UbVc+Hgla0KktCE5QczIcGEs9ZfdDo5lA4zfK3kzwcWc9PprHkkdD6y2AIVmOvz +jo0q50UME86wa7fv3GU0NWL+x+ASHpG2ZUBflJzD+kQUEPMrmvmsEmE9BSfD1kzEQGDMS vSQUX13Nwi1eAPnK8WXJHLyICQardE5viUbQAN4CWB4ZR1RiGDhz7Vw8CCE7cmf9X4XQUc Zdalq/QSvqgt/uc8+Z5LFAdRDR0CUZ2X03QyVZhPJ+YhiROUOUntHMjsYZD6fw== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 14/16] dns.cgi: Fixes bug 13892 Date: Thu, 25 Sep 2025 13:12:50 +0200 Message-ID: <20250925111252.11893-14-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 13892 - dns.cgi TLS_HOSTNAME Stored Cross-Site Scripting Signed-off-by: Adolf Belka --- html/cgi-bin/dns.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 0d3b14797..a4f1c719e 100644 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2005-2024 IPFire Team # +# Copyright (C) 2005-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 # @@ -187,6 +187,7 @@ if (($cgiparams{'SERVERS'} eq $Lang::tr{'save'}) || ($cgiparams{'SERVERS'} eq $L } # Add/Modify the entry to/in the dns_servers hash. + $cgiparams{'TLS_HOSTNAME'} = &Header::escape($cgiparams{'TLS_HOSTNAME'}); $dns_servers{$id} = ["$cgiparams{'NAMESERVER'}", "$cgiparams{'TLS_HOSTNAME'}", "$status", "$cgiparams{'REMARK'}"]; # Write the changed hash to the config file. -- 2.51.0