[1/3] IPsec: Fix extra whitespace in exported certificates

Message ID 20210824155048.13859-1-michael.tremer@ipfire.org
State Accepted
Commit 6688e0bc7ac5526fb934f1c01acb4001b6f21930
Headers
Series [1/3] IPsec: Fix extra whitespace in exported certificates |

Commit Message

Michael Tremer Aug. 24, 2021, 3:50 p.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 html/cgi-bin/vpnmain.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Stefan Schantl Sept. 3, 2021, 4:26 p.m. UTC | #1
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>  html/cgi-bin/vpnmain.cgi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
> index d54b56577..980601ba0 100644
> --- a/html/cgi-bin/vpnmain.cgi
> +++ b/html/cgi-bin/vpnmain.cgi
> @@ -849,7 +849,7 @@ END
>                 print "Content-Disposition: attachment;
> filename=cacert.pem\r\n\r\n";
>  
>                 my @cert =
> &General::system_output("/usr/bin/openssl", "x509", "-in",
> "${General::swroot}/ca/cacert.pem");
> -               print "@cert";
> +               print join("", @cert);
>                 exit(0);
>         }
>  ###
> @@ -861,7 +861,7 @@ END
>                 print "Content-Disposition: attachment;
> filename=hostcert.pem\r\n\r\n";
>  
>                 my @cert =
> &General::system_output("/usr/bin/openssl", "x509", "-in",
> "${General::swroot}/certs/hostcert.pem");
> -               print "@cert";
> +               print join("", @cert);
>                 exit(0);
>         }
>  ###
  

Patch

diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
index d54b56577..980601ba0 100644
--- a/html/cgi-bin/vpnmain.cgi
+++ b/html/cgi-bin/vpnmain.cgi
@@ -849,7 +849,7 @@  END
 		print "Content-Disposition: attachment; filename=cacert.pem\r\n\r\n";
 
 		my @cert = &General::system_output("/usr/bin/openssl", "x509", "-in", "${General::swroot}/ca/cacert.pem");
-		print "@cert";
+		print join("", @cert);
 		exit(0);
 	}
 ###
@@ -861,7 +861,7 @@  END
 		print "Content-Disposition: attachment; filename=hostcert.pem\r\n\r\n";
 
 		my @cert = &General::system_output("/usr/bin/openssl", "x509", "-in", "${General::swroot}/certs/hostcert.pem");
-		print "@cert";
+		print join("", @cert);
 		exit(0);
 	}
 ###