From patchwork Mon Jun 17 11:12:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7882 Return-Path: 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 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4W2nKt6fdQz3wnw for ; Mon, 17 Jun 2024 11:12:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4W2nKn5NcPz4X5; Mon, 17 Jun 2024 11:12:45 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4W2nKm5DhVz33Fc; Mon, 17 Jun 2024 11:12:44 +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 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4W2nKk2Jjvz2xRp for ; Mon, 17 Jun 2024 11:12:42 +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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4W2nKj68wmz1Yf; Mon, 17 Jun 2024 11:12:41 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1718622761; 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=J9YaUN5rohbRK5OzwYINiC1bhFGchRlajrDbVsdezr8=; b=MRSGTVq+QTOhiwUb9Vle28aEpXbmTxAgU9z62jzUuaK8zWKsD8ymVwkS71NLgSeBoRBabB Cp+rPoy7TyugfeBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1718622761; 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=J9YaUN5rohbRK5OzwYINiC1bhFGchRlajrDbVsdezr8=; b=JJm+k/SLjonCJktHkQbg8+8gsD9O6pD7S/sp3CSDEsW0U1O64CzfUHtsgq1ZDHzyonIQg5 cNEh/gw4IfvFqrBiCbAh8CREYefUFcjUkX92tETeF93tQvIbjX/IamxltnaE3a6XQM3jBn XqJG/XJoeDW8H8u9Ohx0fLgRHIpfbYhNV4RA8vkro30/r8tDc/ZE9QXlm3wUZ3F7J1zUFe QLPHVTfDW2KpuMRlR53jDmPVP1DkZRJM1ppKVd7zZmcP8wL7WIhC8X/IPWnSi4/lWDa8MW x1OC73m17M/H7AoDD8+Z8680xwR5MZOQxRHVR+KO2tWFGpGBPiz8gQ3YHug3XA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] dns.cgi: Remove the decode and encode lines as now integrated in header.pl Date: Mon, 17 Jun 2024 13:12:36 +0200 Message-ID: <20240617111236.2926-2-adolf.belka@ipfire.org> In-Reply-To: <20240617111236.2926-1-adolf.belka@ipfire.org> References: <20240617111236.2926-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 4RXKYQWU26GEYT2TEHGX3O6JSSFEOU2S X-Message-ID-Hash: 4RXKYQWU26GEYT2TEHGX3O6JSSFEOU2S X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - decode and encode lines have now been integrated into the cleanhtml subroutine in header.pl so that all uses of cleanhtml will be able to handle diacritical characters Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/dns.cgi | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 1181523d4..0d3b14797 100644 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -21,7 +21,6 @@ use strict; use IO::Socket; -use Encode; # enable only the following on debugging purpose #use warnings; @@ -143,18 +142,8 @@ if (($cgiparams{'SERVERS'} eq $Lang::tr{'save'}) || ($cgiparams{'SERVERS'} eq $L # Go further if there was no error. if ( ! $errormessage) { # Check if a remark has been entered. - - # decode the UTF-8 text so that characters with diacritical marks such as - # umlauts are treated correctly by the following cleanhtml command - $cgiparams{'REMARK'} = decode("UTF-8", $cgiparams{'REMARK'}); - - # run the REMARK text through cleanhtml to ensure all unsafe html characters - # are correctly encoded to their html entities $cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'}); - # encode the text back to UTF-8 after running the cleanhtml command - $cgiparams{'REMARK'} = encode("UTF-8", $cgiparams{'REMARK'}); - my %dns_servers = (); my $id; my $status;