[Web] Compatibility: Re-add _int vars

This commit is contained in:
andryyy 2020-09-26 22:02:34 +02:00
parent 23f118a152
commit d5c22de9b3
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 6 additions and 0 deletions

View File

@ -264,7 +264,9 @@ function admin($_action, $_data = null) {
} }
$admindata['username'] = $row['username']; $admindata['username'] = $row['username'];
$admindata['tfa_active'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active']; $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'] = $row['active'];
$admindata['active_int'] = $row['active'];
$admindata['created'] = $row['created']; $admindata['created'] = $row['created'];
return $admindata; return $admindata;
break; break;

View File

@ -416,7 +416,9 @@ function domain_admin($_action, $_data = null) {
} }
$domainadmindata['username'] = $row['username']; $domainadmindata['username'] = $row['username'];
$domainadmindata['tfa_active'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active']; $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'] = $row['active'];
$domainadmindata['active_int'] = $row['active'];
$domainadmindata['created'] = $row['created']; $domainadmindata['created'] = $row['created'];
// GET SELECTED // GET SELECTED
$stmt = $pdo->prepare("SELECT `domain` FROM `domain` $stmt = $pdo->prepare("SELECT `domain` FROM `domain`

View File

@ -171,6 +171,7 @@ function fail2ban($_action, $_data = null) {
} }
// Whitelist network // Whitelist network
elseif ($_data['action'] == "whitelist") { elseif ($_data['action'] == "whitelist") {
if (empty($network)) { continue; }
if (valid_network($network)) { if (valid_network($network)) {
try { try {
$redis->hSet('F2B_WHITELIST', $network, 1); $redis->hSet('F2B_WHITELIST', $network, 1);
@ -197,6 +198,7 @@ function fail2ban($_action, $_data = null) {
} }
// Blacklist network // Blacklist network
elseif ($_data['action'] == "blacklist") { elseif ($_data['action'] == "blacklist") {
if (empty($network)) { continue; }
if (valid_network($network) && !in_array($network, array( if (valid_network($network) && !in_array($network, array(
'0.0.0.0', '0.0.0.0',
'0.0.0.0/0', '0.0.0.0/0',