From mboxrd@z Thu Jan  1 00:00:00 1970
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 1/2] ovpnmain.cgi: Fixes bug#13548 - imported N2N client
 connections get disabled instead of no-pass
Date: Thu, 22 Feb 2024 13:43:38 +0100
Message-ID: <20240222124339.9847-1-adolf.belka@ipfire.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8232749819014792313=="
List-Id: <development.lists.ipfire.org>

--===============8232749819014792313==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

- When bug#11408 was fixed it was missed that key 41 has disabled inserted in=
to it when
   uploading into the N2N client. This replaced the no-pass entry for all N2N=
 connections
   resulting in the ovpnmain.cgi not being able to show the status correctly =
as the code
   looks for pass or no-pass.
- The disabled entry has been present for a very long time and is not utilise=
d anywhere
   in the code.
- This fix ensures that key 41 in the uploaded N2N connection has no-pass ent=
ered
- Tested out and confirmed in my vm testbed.

Fixes: Bug#13548
Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 html/cgi-bin/ovpnmain.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index eb89c5095..b773bc4b7 100755
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -3472,7 +3472,7 @@ foreach my $dkey (keys %confighash) {
 	$confighash{$key}[31] =3D $n2ntunmtu[1];
 	$confighash{$key}[39] =3D $n2nauth[1];
 	$confighash{$key}[40] =3D $n2ncipher[1];
-	$confighash{$key}[41] =3D 'disabled';
+	$confighash{$key}[41] =3D 'no-pass';
=20
   &General::writehasharray("${General::swroot}/ovpn/ovpnconfig", \%confighas=
h);
=20
--=20
2.43.2


--===============8232749819014792313==--