From: Michael Tremer <michael.tremer@ipfire.org>
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 [thread overview]
Message-ID: <20210713153053.11281-1-michael.tremer@ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 3739 bytes --]
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
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 "<pre>@output</pre>\n";
+ my $output = &Header::cleanhtml(join("", @output),"y");
+ print "<pre>$output</pre>\n";
&Header::closebox();
print "<div align='center'><a href='/cgi-bin/ovpnmain.cgi'>$Lang::tr{'back'}</a></div>";
&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 "<pre>@output</pre>\n";
+ my $output = &Header::cleanhtml(join("", @output), "y");
+ print "<pre>$output</pre>\n";
&Header::closebox();
print "<div align='center'><a href='/cgi-bin/ovpnmain.cgi'>$Lang::tr{'back'}</a></div>";
&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 "<pre>@output</pre>\n";
+ my $output = &Header::cleanhtml(join("", @output), "y");
+ print "<pre>$output</pre>\n";
&Header::closebox();
print "<div align='center'><a href='/cgi-bin/ovpnmain.cgi'>$Lang::tr{'back'}</a></div>";
&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 "<pre>@output</pre>\n";
+ my $output = &Header::cleanhtml(join("", @output) ,"y");
+ print "<pre>$output</pre>\n";
&Header::closebox();
print "<div align='center'><a href='/cgi-bin/ovpnmain.cgi'>$Lang::tr{'back'}</a></div>";
&Header::closebigbox();
@@ -2664,8 +2664,8 @@ else
my @output = <FILE>;
close(FILE);
- @output = &Header::cleanhtml(@output,"y");
- print "<pre>@output</pre>\n";
+ my $output = &Header::cleanhtml(join("", @output),"y");
+ print "<pre>$output</pre>\n";
&Header::closebox();
print "<div align='center'><a href='/cgi-bin/ovpnmain.cgi'>$Lang::tr{'back'}</a></div>";
&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 "<pre>@output</pre>\n";
+ my $output = &Header::cleanhtml(join("", @output), "y");
+ print "<pre>$output</pre>\n";
&Header::closebox();
print "<div align='center'><a href='/cgi-bin/ovpnmain.cgi'>$Lang::tr{'back'}</a></div>";
&Header::closebigbox();
--
2.31.0
next reply other threads:[~2021-07-13 15:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 15:30 Michael Tremer [this message]
2021-07-13 15:30 ` [PATCH 2/3] Partially revert "vpnmain.cgi: Use new system methods" Michael Tremer
2021-07-13 15:30 ` [PATCH 3/3] vpnmain.cgi: Join certificate output before &Header::cleanhtml(); Michael Tremer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210713153053.11281-1-michael.tremer@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox