From 28b9c97651023355dce2b0653eedefea8e72d0d3 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 26 May 2023 14:26:16 +0000 Subject: [PATCH] Revert "ovpnmain.cgi: Fix for bug#11048 - insecure download icon shown for connections with a password" This reverts commit 762c88ec4d85e3a4f7265b887f054cbe7703eb7c. Signed-off-by: Michael Tremer --- html/cgi-bin/ovpnmain.cgi | 72 ++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 5b0accf3fc..5c4fad0a5f 100755 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -4327,14 +4327,8 @@ if ($cgiparams{'TYPE'} eq 'net') { $confighash{$key}[39] = $cgiparams{'DAUTH'}; $confighash{$key}[40] = $cgiparams{'DCIPHER'}; - if ($confighash{$key}[41] eq "") { - if (($cgiparams{'TYPE'} eq 'host') && ($cgiparams{'CERT_PASS1'} eq "")) { - $confighash{$key}[41] = "no-pass"; - } elsif (($cgiparams{'TYPE'} eq 'host') && ($cgiparams{'CERT_PASS1'} ne "")) { - $confighash{$key}[41] = "pass"; - } elsif ($cgiparams{'TYPE'} eq 'net') { - $confighash{$key}[41] = "no-pass"; - } + if (($cgiparams{'TYPE'} eq 'host') && ($cgiparams{'CERT_PASS1'} eq "")) { + $confighash{$key}[41] = "no-pass"; } $confighash{$key}[42] = 'HOTP/T30/6'; @@ -5476,24 +5470,20 @@ END } - if ($confighash{$key}[41] eq "pass") { - print <$active + print <$active -
- - - - -
+
+ + + +
END + ; - ; } elsif ($confighash{$key}[41] eq "no-pass") { + if ($confighash{$key}[41] eq "no-pass") { print <$active - -
+ @@ -5501,7 +5491,7 @@ END
END - ; } else { + } else { print " "; } @@ -5577,32 +5567,30 @@ END # If the config file contains entries, print Key to action icons if ( $id ) { print < - + + - - - - + + - - - - - - - - - - - - -
  $Lang::tr{'legend'}:    ?RELOAD$Lang::tr{'dl client arch insecure'}    ?RELOAD$Lang::tr{'dl client arch'}  $Lang::tr{$Lang::tr{'click to disable'}     $Lang::tr{ $Lang::tr{'show certificate'}    $Lang::tr{$Lang::tr{'show otp qrcode'}
      ?FLOPPY$Lang::tr{'download certificate'}  ?OFF$Lang::tr{'click to enable'}  $Lang::tr{$Lang::tr{'click to disable'}     $Lang::tr{ $Lang::tr{'edit'}     $Lang::tr{ $Lang::tr{'remove'}

+ + +   +   ?OFF + $Lang::tr{'click to enable'} +     ?FLOPPY + $Lang::tr{'download certificate'} +     ?RELOAD + $Lang::tr{'dl client arch'} +     $Lang::tr{ + $Lang::tr{'show otp qrcode'} + +
END ; } -- 2.39.5