Bugfix: with DNSBL
This commit is contained in:
parent
f48bfbf299
commit
3d8ab0a350
@ -1239,14 +1239,14 @@ function checkDNSBL() {
|
|||||||
if (in_array($_SERVER['REMOTE_ADDR'], $config['dnsbl_exceptions']))
|
if (in_array($_SERVER['REMOTE_ADDR'], $config['dnsbl_exceptions']))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$ip = ReverseIPOctets($_SERVER['REMOTE_ADDR']);
|
$ipaddr = ReverseIPOctets($_SERVER['REMOTE_ADDR']);
|
||||||
|
|
||||||
foreach ($config['dnsbl'] as $blacklist) {
|
foreach ($config['dnsbl'] as $blacklist) {
|
||||||
if (!is_array($blacklist) == 1)
|
if (!is_array($blacklist))
|
||||||
$blacklist = array($blacklist);
|
$blacklist = array($blacklist);
|
||||||
|
|
||||||
if (($lookup = str_replace('%', $ip, $blacklist[0])) == $blacklist[0])
|
if (($lookup = str_replace('%', $ipaddr, $blacklist[0])) == $blacklist[0])
|
||||||
$lookup = $ip . '.' . $blacklist[0];
|
$lookup = $ipaddr . '.' . $blacklist[0];
|
||||||
|
|
||||||
if (!$ip = DNS($lookup))
|
if (!$ip = DNS($lookup))
|
||||||
continue; // not in list
|
continue; // not in list
|
||||||
|
Loading…
Reference in New Issue
Block a user