Skip to content

Commit 45179ba

Browse files
fix: respect LF_TEMP_EMAIL_ALERT for blockaccount
- fixed distattack temporary email alerts reported in #3 tnx @radialmonster
1 parent 2c97ff0 commit 45179ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lfd.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,7 @@ sub blockaccount {
26642664
}
26652665
}
26662666

2667-
if ($config{LF_EMAIL_ALERT}) {
2667+
if ($config{LF_EMAIL_ALERT} and ($perm or (!$perm and $config{LF_TEMP_EMAIL_ALERT}))) {
26682668
my @alert = slurp("/usr/local/csf/tpl/alert.txt");
26692669
my $block = "Temporary Block for $temp seconds [LF_DISTATTACK]";
26702670
if ($perm) {$block = "Permanent Block [LF_DISTATTACK]"}

0 commit comments

Comments
 (0)