Skip to content

Commit f5342a7

Browse files
committed
Whitelist -> Allowlist
1 parent 701c243 commit f5342a7

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

bfstop.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@ public function onUserLoginFailure($user, $options=null)
301301
$this->logger->log('Empty IP address!', JLog::ERROR);
302302
return;
303303
}
304-
if ($this->mydb->isIPWhiteListed($ipAddress))
304+
if ($this->mydb->isIPOnAllowList($ipAddress))
305305
{
306-
$this->logger->log('Ignoring failed login by whitelisted address '.$ipAddress, JLog::INFO);
306+
$this->logger->log('Ignoring failed login by allowed address '.$ipAddress, JLog::INFO);
307307
return;
308308
}
309309
JPlugin::loadLanguage('plg_system_bfstop');
@@ -385,7 +385,7 @@ public function onAfterInitialise()
385385
}
386386
}
387387
$ipaddress = $this->getIPAddr();
388-
if ($this->mydb->isIPWhiteListed($ipaddress))
388+
if ($this->mydb->isIPOnAllowList($ipaddress))
389389
{
390390
return;
391391
}

helpers/db.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ public function isIPBlocked($ipaddress)
216216
return ($entryCount > 0);
217217
}
218218

219-
public function isIPWhiteListed($ipaddress)
219+
public function isIPOnAllowList($ipaddress)
220220
{
221-
$sqlCheckPattern = "SELECT id, ipaddress from #__bfstop_whitelist WHERE %s";
221+
$sqlCheckPattern = "SELECT id, ipaddress from #__bfstop_allowlist WHERE %s";
222222
$sqlIPCheck = sprintf($sqlCheckPattern, $this->ipAddressMatch($ipaddress));
223223
$sqlSubNetIPv4Check = sprintf($sqlCheckPattern, $this->ipSubNetIPv4Match($ipaddress));
224-
$entryCount = $this->checkForEntries($sqlIPCheck, "Whitelisted");
225-
$entryCount += $this->checkForEntries($sqlSubNetIPv4Check, "Whitelisted");
224+
$entryCount = $this->checkForEntries($sqlIPCheck, "Allowed");
225+
$entryCount += $this->checkForEntries($sqlSubNetIPv4Check, "Allowed");
226226
return ($entryCount > 0);
227227
}
228228

sql/updates/1.5.0.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
DELETE FROM #__update_sites WHERE location LIKE 'https://github.com/codeling%';
22

33
ALTER TABLE #__bfstop_failedlogin MODIFY username varchar(150) NOT NULL;
4+
5+
RENAME TABLE `#__bfstop_whitelist` TO `#__bfstop_allowlist`;

0 commit comments

Comments
 (0)