From patchwork Tue Jul 13 15:30:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 4513 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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GPPjj71kNz3xCm for ; Tue, 13 Jul 2021 15:31:05 +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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GPPjg6XKwz1Tp; Tue, 13 Jul 2021 15:31:03 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GPPjg3xjMz2xyg; Tue, 13 Jul 2021 15:31:03 +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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GPPjf592jz2xKH for ; Tue, 13 Jul 2021 15:31:02 +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 (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GPPjf08H9zZZ; Tue, 13 Jul 2021 15:31:01 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1626190262; 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; bh=F8YRzddxGGMhm5UzFVvBZ0tkl1wwmJ35GI6TrDNhI5Y=; b=WDrvsEVdPPwagOsCtcYp0daetVxTtdPIlL0PfNrVPLDlbd+PhjZK+uPNEdi9VZHCfmLlgV uk4+8vs9Ewb2nICA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1626190262; 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; bh=F8YRzddxGGMhm5UzFVvBZ0tkl1wwmJ35GI6TrDNhI5Y=; b=rGRvD1icR9nKQ2L5Hrzi8HNe0w0QfMF72Kr7FD4uJ+gSDXBwF27qDQUQc37rf1lPGU3iNy 1IVv6uFBwV0v7muinOx2mOl0IZzw7j5LY3xOgCaGFnElzVGkSswqtg547Cp/4CN4MHd1s/ nDc50GEMPSgwuXhpDuiylrAAwECSDdKfzY3xlPXuSz97SaC1x8DWZKfP2a1LItuNT64RnT AxiJeELB7Zm2wlO+wMdvQAgIzz/w5eIPlDZ9ZFuVfjDl8QDPKSJwn39MNpzw29PDrJDjzw zXNBt4+0tuOokDWsp9zD2EHW8YuQw473F+dd7VWT1fTIIUgLk6aioZnTINSO3g== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 1/3] ovpnmain.cgi: Join certificate output before &Header::cleanhtml(); Date: Tue, 13 Jul 2021 15:30:51 +0000 Message-Id: <20210713153053.11281-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- html/cgi-bin/ovpnmain.cgi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 7a2833ce6..3cd2f9381 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -1532,8 +1532,8 @@ END &Header::openbigbox('100%', 'LEFT', '', $errormessage); &Header::openbox('100%', 'LEFT', "$Lang::tr{'ca certificate'}:"); my @output = &General::system_output("/usr/bin/openssl", "x509", "-text", "-in", "${General::swroot}/ovpn/ca/$cahash{$cgiparams{'KEY'}}[0]cert.pem"); - @output = &Header::cleanhtml(@output,"y"); - print "
@output
\n"; + my $output = &Header::cleanhtml(join("", @output),"y"); + print "
$output
\n"; &Header::closebox(); print ""; &Header::closebigbox(); @@ -1652,8 +1652,8 @@ END &Header::openbox('100%', 'LEFT', "$Lang::tr{'host certificate'}:"); @output = &General::system_output("/usr/bin/openssl", "x509", "-text", "-in", "${General::swroot}/ovpn/certs/servercert.pem"); } - @output = &Header::cleanhtml(@output,"y"); - print "
@output
\n"; + my $output = &Header::cleanhtml(join("", @output), "y"); + print "
$output
\n"; &Header::closebox(); print ""; &Header::closebigbox(); @@ -2616,8 +2616,8 @@ else &Header::openbigbox('100%', 'LEFT', '', ''); &Header::openbox('100%', 'LEFT', "$Lang::tr{'certificate'}:"); my @output = &General::system_output("/usr/bin/openssl", "x509", "-text", "-in", "${General::swroot}/ovpn/certs/$confighash{$cgiparams{'KEY'}}[1]cert.pem"); - @output = &Header::cleanhtml(@output,"y"); - print "
@output
\n"; + my $output = &Header::cleanhtml(join("", @output), "y"); + print "
$output
\n"; &Header::closebox(); print ""; &Header::closebigbox(); @@ -2638,8 +2638,8 @@ else &Header::openbigbox('100%', 'LEFT', '', ''); &Header::openbox('100%', 'LEFT', "$Lang::tr{'dh'}:"); my @output = &General::system_output("/usr/bin/openssl", "dhparam", "-text", "-in", "${General::swroot}/ovpn/ca/dh1024.pem"); - @output = &Header::cleanhtml(@output,"y"); - print "
@output
\n"; + my $output = &Header::cleanhtml(join("", @output) ,"y"); + print "
$output
\n"; &Header::closebox(); print ""; &Header::closebigbox(); @@ -2664,8 +2664,8 @@ else my @output = ; close(FILE); - @output = &Header::cleanhtml(@output,"y"); - print "
@output
\n"; + my $output = &Header::cleanhtml(join("", @output),"y"); + print "
$output
\n"; &Header::closebox(); print ""; &Header::closebigbox(); @@ -2687,8 +2687,8 @@ else &Header::openbigbox('100%', 'LEFT', '', ''); &Header::openbox('100%', 'LEFT', "$Lang::tr{'crl'}:"); my @output = &General::system_output("/usr/bin/openssl", "crl", "-text", "-noout", "-in", "${General::swroot}/ovpn/crls/cacrl.pem"); - @output = &Header::cleanhtml(@output,"y"); - print "
@output
\n"; + my $output = &Header::cleanhtml(join("", @output), "y"); + print "
$output
\n"; &Header::closebox(); print ""; &Header::closebigbox();