[1/2] ovpnmain.cgi: Fix for bug in WUI menu on CU172 Testing

Message ID 20221205084015.3563799-1-adolf.belka@ipfire.org
State Accepted
Commit 19a417c2a10df279b2aa0e0644838bf892410a07
Headers
Series [1/2] ovpnmain.cgi: Fix for bug in WUI menu on CU172 Testing |

Commit Message

Adolf Belka 5 Dec 2022, 8:40 a.m. UTC
  - On CU172 Testing Build: master/eb9e29f9 when selecting the OpenVPN menu it showed the
   Diffie-Hellman info and pressing back took you to the same DH page.
- Tested patch suggestion from Erik on vm testbed and confirmed that it worked.

Suggested-by: Erik Kapfer <erik.kapfer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/ovpnmain.cgi | 4 ++--
 langs/de/cgi-bin/de.pl    | 2 ++
 langs/en/cgi-bin/en.pl    | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)
  

Patch

diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index dc429d90c..ecfd4fdaf 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -977,7 +977,7 @@  unless(-d "${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}"){mkdir "${General
   print SERVERCONF "ca ${General::swroot}/ovpn/ca/cacert.pem\n";
   print SERVERCONF "cert ${General::swroot}/ovpn/certs/servercert.pem\n";
   print SERVERCONF "key ${General::swroot}/ovpn/certs/serverkey.pem\n";
-  print SERVERCONF "dh ${General::swroot}/ovpn/ca/$cgiparams{'DH_NAME'}\n";
+  print SERVERCONF "dh $dhparameter\n";
   print SERVERCONF "# Cipher\n";
   print SERVERCONF "cipher $cgiparams{'DCIPHER'}\n";
 
@@ -5700,7 +5700,7 @@  END
 
 	print <<END;
 		<tr>
-			<td class='base' $col3>$Lang::tr{'dh parameter'}</td>
+			<td class='base' $col3>$Lang::tr{'dh'}</td>
 			<td class='base' $col3>$dhsubject</td>
 			<form method='post' name='frmdhparam'><td width='3%' align='center' $col3>
 			<input type='hidden' name='ACTION' value='$Lang::tr{'show dh'}' />
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index a52d41531..457a7108c 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -760,6 +760,7 @@ 
 'details' => 'Mehr',
 'device' => 'Gerät',
 'devices on blue' => 'Geräte auf BLAU',
+'dh' => 'Diffie-Hellman-Parameter',
 'dhcp advopt add' => 'DHCP Option hinzufügen',
 'dhcp advopt added' => 'DHCP Option hinzugefügt',
 'dhcp advopt blank value' => 'Wert für DHCP Option darf nicht leer sein',
@@ -2256,6 +2257,7 @@ 
 'show ca certificate' => 'CA Zertifikat anzeigen',
 'show certificate' => 'Datei anzeigen',
 'show crl' => 'Certificate Revocation List anzeigen',
+'show dh' => 'Diffie-Hellman-Parameter anzeigen',
 'show host certificate' => 'Host-Zertifikat anzeigen',
 'show last x lines' => 'die letzten x Zeilen anzeigen',
 'show otp qrcode' => 'Zeige OTP QRCode',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index bcba77aa4..72cef9a11 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -795,6 +795,7 @@ 
 'details' => 'Details',
 'device' => 'Device',
 'devices on blue' => 'Devices on BLUE',
+'dh' => 'Diffie-Hellman-Parameter',
 'dhcp advopt add' => 'Add a DHCP option',
 'dhcp advopt added' => 'DHCP option added',
 'dhcp advopt blank value' => 'DHCP Option value cannot be empty.',
@@ -2313,6 +2314,7 @@ 
 'show ca certificate' => 'Show CA certificate',
 'show certificate' => 'Show file',
 'show crl' => 'Show certificate revocation list',
+'show dh' => 'Show Diffie-Hellman parameters',
 'show host certificate' => 'Show host certificate',
 'show last x lines' => 'Show last x lines',
 'show lines' => 'Show lines',