mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-04 03:48:28 +02:00
[Web] Fail2ban: Only write regex filters if not empty
This commit is contained in:
parent
d4dd1024c9
commit
bf62f31b9e
@ -129,7 +129,9 @@ function fail2ban($_action, $_data = null) {
|
||||
$regex_array[$rule_id] = $regex;
|
||||
$rule_id++;
|
||||
}
|
||||
$redis->Set('F2B_REGEX', json_encode($regex_array, JSON_UNESCAPED_SLASHES));
|
||||
if (!empty($regex_array)) {
|
||||
$redis->Set('F2B_REGEX', json_encode($regex_array, JSON_UNESCAPED_SLASHES));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$_SESSION['return'][] = array(
|
||||
|
Loading…
Reference in New Issue
Block a user