vpnmain.cgi: Fix extra whitespace in exported pk12 file

Message ID 20211230191536.2937-1-stefan.schantl@ipfire.org
State Accepted
Commit f8384fbf8de3406174dd54a4f22d0900b7fbe6dd
Headers
Series vpnmain.cgi: Fix extra whitespace in exported pk12 file |

Commit Message

Stefan Schantl Dec. 30, 2021, 7:15 p.m. UTC
  Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 html/cgi-bin/vpnmain.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer Dec. 31, 2021, 5:19 p.m. UTC | #1
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 30 Dec 2021, at 19:15, Stefan Schantl <stefan.schantl@ipfire.org> wrote:
> 
> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
> html/cgi-bin/vpnmain.cgi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
> index 004e3ad1f..fb0af104f 100644
> --- a/html/cgi-bin/vpnmain.cgi
> +++ b/html/cgi-bin/vpnmain.cgi
> @@ -1242,7 +1242,7 @@ END
> 	open(FILE, "${General::swroot}/certs/$confighash{$cgiparams{'KEY'}}[1].p12");
> 	my @p12 = <FILE>;
> 	close(FILE);
> -	print "@p12";
> +	print join("", @p12);
> 
> 	exit (0);
> 
> -- 
> 2.30.2
>
  
Peter Müller Dec. 31, 2021, 8:04 p.m. UTC | #2
Hello Stefan,

this patch looks good to me, although I did not have time to test it yet.

Fixes: #12672 (probably, but let's be optimistic for once ;-) )

Reviewed-by: Peter Müller <peter.mueller@ipfire.org>

All the best for 2022!

Thanks, and best regards,
Peter Müller


> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
>   html/cgi-bin/vpnmain.cgi | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
> index 004e3ad1f..fb0af104f 100644
> --- a/html/cgi-bin/vpnmain.cgi
> +++ b/html/cgi-bin/vpnmain.cgi
> @@ -1242,7 +1242,7 @@ END
>   	open(FILE, "${General::swroot}/certs/$confighash{$cgiparams{'KEY'}}[1].p12");
>   	my @p12 = <FILE>;
>   	close(FILE);
> -	print "@p12";
> +	print join("", @p12);
>   
>   	exit (0);
>   
>
  

Patch

diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
index 004e3ad1f..fb0af104f 100644
--- a/html/cgi-bin/vpnmain.cgi
+++ b/html/cgi-bin/vpnmain.cgi
@@ -1242,7 +1242,7 @@  END
 	open(FILE, "${General::swroot}/certs/$confighash{$cgiparams{'KEY'}}[1].p12");
 	my @p12 = <FILE>;
 	close(FILE);
-	print "@p12";
+	print join("", @p12);
 
 	exit (0);