From 1aeeaf4c2b6f4c8f79e2472b7c66a832d0daf802 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Nov 2020 17:15:32 +0100 Subject: [PATCH] Bug 22343: (follow-up) Correctly handle password on editing Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- admin/smtp_servers.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/admin/smtp_servers.pl b/admin/smtp_servers.pl index 9423404dea..19458a23a4 100755 --- a/admin/smtp_servers.pl +++ b/admin/smtp_servers.pl @@ -123,12 +123,10 @@ elsif ( $op eq 'edit_save' ) { my $password = $input->param('smtp_password') || undef; my $debug = ( scalar $input->param('smtp_debug_mode') ) ? 1 : 0; - $password = undef - if defined $password and $password eq '****'; - try { $smtp_server->password( $password ) - if $password; + if defined $password and $password ne '****' + or not defined $password; $smtp_server->set( { @@ -138,7 +136,6 @@ elsif ( $op eq 'edit_save' ) { timeout => $timeout, ssl_mode => $ssl_mode, user_name => $user_name, - password => $password, debug => $debug } )->store; -- 2.39.5