From a7167349f4a955b5ba287563c04db3b13cb7bd70 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 29 Nov 2020 15:59:30 -0800 Subject: [PATCH 1/3] Don't show RSA authentication option in newer openssh releases https://sourceforge.net/p/webadmin/bugs/5428/ --- sshd/edit_users.cgi | 3 ++- sshd/save_users.cgi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sshd/edit_users.cgi b/sshd/edit_users.cgi index a17a87989..04d91ea6c 100755 --- a/sshd/edit_users.cgi +++ b/sshd/edit_users.cgi @@ -76,7 +76,8 @@ print &ui_table_row($text{'users_root'}, &ui_select("root", lc($root), \@opts)); # SSH 1 RSA authentication -if ($version{'type'} ne 'ssh' || $version{'number'} < 3) { +if (($version{'type'} eq 'ssh' && $version{'number'} < 3) || + ($version{'type'} eq 'openssh' && $version{'number'} < 7.4)) { $rsa = &find_value("RSAAuthentication", $conf); print &ui_table_row($text{'users_rsa'}, &ui_yesno_radio('rsa', lc($rsa) ne 'no')); diff --git a/sshd/save_users.cgi b/sshd/save_users.cgi index 89503bc5d..be24c10fe 100755 --- a/sshd/save_users.cgi +++ b/sshd/save_users.cgi @@ -47,7 +47,8 @@ if ($version{'type'} ne 'ssh' || $version{'number'} < 3) { &save_directive("PermitRootLogin", $conf, $in{'root'}); -if ($version{'type'} ne 'ssh' || $version{'number'} < 3) { +if (($version{'type'} eq 'ssh' && $version{'number'} < 3) || + ($version{'type'} eq 'openssh' && $version{'number'} < 7.4)) { &save_directive("RSAAuthentication", $conf, $in{'rsa'} ? 'yes' : 'no'); } if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) { From aeb08deb94321d1a99dda799056d2bd0fd138aca Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 29 Nov 2020 16:00:52 -0800 Subject: [PATCH 2/3] Fix version check --- sshd/edit_users.cgi | 2 +- sshd/save_users.cgi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sshd/edit_users.cgi b/sshd/edit_users.cgi index 04d91ea6c..1d6d765b5 100755 --- a/sshd/edit_users.cgi +++ b/sshd/edit_users.cgi @@ -77,7 +77,7 @@ print &ui_table_row($text{'users_root'}, # SSH 1 RSA authentication if (($version{'type'} eq 'ssh' && $version{'number'} < 3) || - ($version{'type'} eq 'openssh' && $version{'number'} < 7.4)) { + ($version{'type'} eq 'openssh' && $version{'number'} < 7.3)) { $rsa = &find_value("RSAAuthentication", $conf); print &ui_table_row($text{'users_rsa'}, &ui_yesno_radio('rsa', lc($rsa) ne 'no')); diff --git a/sshd/save_users.cgi b/sshd/save_users.cgi index be24c10fe..9cccb5eb7 100755 --- a/sshd/save_users.cgi +++ b/sshd/save_users.cgi @@ -48,7 +48,7 @@ if ($version{'type'} ne 'ssh' || $version{'number'} < 3) { &save_directive("PermitRootLogin", $conf, $in{'root'}); if (($version{'type'} eq 'ssh' && $version{'number'} < 3) || - ($version{'type'} eq 'openssh' && $version{'number'} < 7.4)) { + ($version{'type'} eq 'openssh' && $version{'number'} < 7.3)) { &save_directive("RSAAuthentication", $conf, $in{'rsa'} ? 'yes' : 'no'); } if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) { From 1f9e4795caec8b332678beca2e25b809cddd41b2 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 29 Nov 2020 16:33:54 -0800 Subject: [PATCH 3/3] Do proper MIME encoding of subject header https://github.com/webmin/usermin/issues/67 --- mailboxes/boxes-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailboxes/boxes-lib.pl b/mailboxes/boxes-lib.pl index 3eb6ee2eb..69dd52fba 100755 --- a/mailboxes/boxes-lib.pl +++ b/mailboxes/boxes-lib.pl @@ -2907,7 +2907,7 @@ local $mail = { 'headers' => [ [ 'From', $from ], [ 'To', $to ], [ 'Cc', $cc ], - [ 'Subject', $subject ] ], + [ 'Subject', &encode_mimewords($subject) ] ], 'attach' => [ $attach ] }; return &send_mail($mail, undef, 1, 0, $smtp); }