Fix log email being sent to bogus address when no destination is set

This commit is contained in:
Ilia Ross
2026-08-20 03:23:49 +02:00
parent 076f2eea33
commit 3eccc770dd

View File

@@ -7803,7 +7803,7 @@ my $lu = $base_remote_user || $remote_user;
my $logemailto;
if ($gconfig{'logemail'} eq "*") {
$logemailto = $gconfig{'webmin_email_to'};
if ($gconfig{'webmin_email_to_name'}) {
if ($logemailto && $gconfig{'webmin_email_to_name'}) {
$logemailto = "$gconfig{'webmin_email_to_name'} <$logemailto>";
}
}