From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] ovpnmain.cgi: Fixes bug#13190 - connection status shows disconnected for connected client Date: Thu, 27 Jul 2023 15:57:25 +0200 Message-ID: <20230727135725.7053-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0115101666588895512==" List-Id: --===============0115101666588895512== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - If the certificate name has underscores in it then the status always shows = as DISCONNECTED alothough the actual connection is working and can be used. - The certificate with underscores works fine. RFC5280 accepts underscores in= the name. - The code for checking the status splits up the status message and takes the= first part as the common name for the connection. Then there is a regex command which= rerplaces any underscores in the status common name with spaces. This results in the= connection with underscores in the certificate name never matching any status feedbac= k common name as the underscores have been replaced by spaces. - This has been tested to work with my vm test bed. With existing code the co= nnection with underscores in the certificate name permanently showed DISCONNECTED. With = the code change the connection shows as CONNECTED very quickly. Fixes: Bug#13190 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/ovpnmain.cgi | 1 - 1 file changed, 1 deletion(-) diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index f734331fa..5afe54f55 100755 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -5502,7 +5502,6 @@ END if ($match[1] ne "Common Name") { $cn =3D $match[1]; } - $cn =3D~ s/[_]/ /g; if ($cn eq "$confighash{$key}[2]") { $col1=3D"bgcolor=3D'${Header::colourgreen}'"; $active =3D "$Lang::tr{'capsopen'}"; --=20 2.41.0 --===============0115101666588895512==--