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 4cXWKw2r8rz36gw for ; Thu, 25 Sep 2025 11:13:24 +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 4cXWKn1Hz6z330q 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 4cXWKm3w4dz3dm; Thu, 25 Sep 2025 11:13:16 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1758798796; 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=Mt7b160kn/O9QzBJ0sZ92sZpWRozjF/i6IhHkQhIvfA=; b=CJLJXJZebEb0WFlsjkrJM1wZ3981IVd+uMSOQ/ug1AEKRwepCXNF0O4sF9HarBhw8qL2PN eBpSuaL9yK+RYgBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1758798796; 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=Mt7b160kn/O9QzBJ0sZ92sZpWRozjF/i6IhHkQhIvfA=; b=qaw6j90JzQobip/GSTsTXTQ6ZKlkgUHkQO7XdHTo8UTSjVgLZ1gtNuxKdhPnSkfHWUsBO3 XK3OrEj3HEgbym8GDalK/O0Z33du+C++l9sMgaKUQBRTFYHswS/rya19olXr6MYuIZWZdu RtXTPpG+CQKZ3in07P0ejFf4XhIarJ0IsvptTrJSAb+zGgMbz+EGWDt3ka9I9/M2/h5lm/ vAbyBRkq2V44tm362zclZKbky+1n1Xf59OKxFUtGCxkr4SRd+76uFXvrSXtrck2X7TjOxX kimi5+8LLgxPAoRU4hif6YvM669fSltSRDYAJzNaGtsCKC54WJHQA91XgUXb5g== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 08/16] ddns.cgi: Fixes bug 13884 Date: Thu, 25 Sep 2025 13:12:44 +0200 Message-ID: <20250925111252.11893-8-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 13884 - ddns.cgi LOGIN PASSWORD SERVICE Stored Cross-Site Scripting Signed-off-by: Adolf Belka --- html/cgi-bin/ddns.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index 34475b75c..60565da3f 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2014 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 # @@ -226,6 +226,9 @@ if (($settings{'ACTION'} eq $Lang::tr{'add'}) || ($settings{'ACTION'} eq $Lang:: flock FILE, 2; # Add account data to the file. + $settings{'SERVICE'} = &Header::escape(($settings{'SERVICE'}); + $settings{'LOGIN'} = &Header::escape(($settings{'LOGIN'}); + $settings{'PASSWORD'} = &Header::escape(($settings{'PASSWORD'}); print FILE "$settings{'SERVICE'},$hostname,$domain,$settings{'PROXY'},$settings{'WILDCARDS'},$settings{'LOGIN'},$settings{'PASSWORD'},$settings{'ENABLED'}\n"; # Close file after writing. -- 2.51.0