From 26cab84bd5cf33fdcb49924e108302e53d20a0c8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 10 Aug 2020 12:57:45 -0300 Subject: [PATCH] Bug 22343: Prevent passing password to the UI Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- admin/smtp_servers.pl | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/smtp_servers.pl b/admin/smtp_servers.pl index 9dff83d0a5..f5d7b083e5 100755 --- a/admin/smtp_servers.pl +++ b/admin/smtp_servers.pl @@ -123,6 +123,9 @@ 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; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt index 1d5813f8bf..732ec91df5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt @@ -171,7 +171,7 @@ SMTP servers
  • - +
  • -- 2.39.5