From d5c22de9b3b47c015cfec18e25198796ae487aec Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 26 Sep 2020 22:02:34 +0200 Subject: [PATCH] [Web] Compatibility: Re-add _int vars --- data/web/inc/functions.admin.inc.php | 2 ++ data/web/inc/functions.domain_admin.inc.php | 2 ++ data/web/inc/functions.fail2ban.inc.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/data/web/inc/functions.admin.inc.php b/data/web/inc/functions.admin.inc.php index 3a087184..3bac1688 100644 --- a/data/web/inc/functions.admin.inc.php +++ b/data/web/inc/functions.admin.inc.php @@ -264,7 +264,9 @@ function admin($_action, $_data = null) { } $admindata['username'] = $row['username']; $admindata['tfa_active'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active']; + $admindata['tfa_active_int'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active']; $admindata['active'] = $row['active']; + $admindata['active_int'] = $row['active']; $admindata['created'] = $row['created']; return $admindata; break; diff --git a/data/web/inc/functions.domain_admin.inc.php b/data/web/inc/functions.domain_admin.inc.php index e0473e2a..8ac3dea4 100644 --- a/data/web/inc/functions.domain_admin.inc.php +++ b/data/web/inc/functions.domain_admin.inc.php @@ -416,7 +416,9 @@ function domain_admin($_action, $_data = null) { } $domainadmindata['username'] = $row['username']; $domainadmindata['tfa_active'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active']; + $domainadmindata['tfa_active_int'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active']; $domainadmindata['active'] = $row['active']; + $domainadmindata['active_int'] = $row['active']; $domainadmindata['created'] = $row['created']; // GET SELECTED $stmt = $pdo->prepare("SELECT `domain` FROM `domain` diff --git a/data/web/inc/functions.fail2ban.inc.php b/data/web/inc/functions.fail2ban.inc.php index 85c9029f..6f6b024f 100644 --- a/data/web/inc/functions.fail2ban.inc.php +++ b/data/web/inc/functions.fail2ban.inc.php @@ -171,6 +171,7 @@ function fail2ban($_action, $_data = null) { } // Whitelist network elseif ($_data['action'] == "whitelist") { + if (empty($network)) { continue; } if (valid_network($network)) { try { $redis->hSet('F2B_WHITELIST', $network, 1); @@ -197,6 +198,7 @@ function fail2ban($_action, $_data = null) { } // Blacklist network elseif ($_data['action'] == "blacklist") { + if (empty($network)) { continue; } if (valid_network($network) && !in_array($network, array( '0.0.0.0', '0.0.0.0/0',