skip DNSBL check for certain IP addresses
This commit is contained in:
parent
f3cc7ead43
commit
01e0a569e0
|
@ -31,6 +31,7 @@
|
||||||
'custom_capcode' => Array(),
|
'custom_capcode' => Array(),
|
||||||
'custom_tripcode' => Array(),
|
'custom_tripcode' => Array(),
|
||||||
'dnsbl' => Array(),
|
'dnsbl' => Array(),
|
||||||
|
'dnsbl_exceptions' => Array()
|
||||||
'remote' => Array()
|
'remote' => Array()
|
||||||
);
|
);
|
||||||
// Database stuff
|
// Database stuff
|
||||||
|
@ -213,6 +214,9 @@
|
||||||
// server-port.reverse-server-ip.ip-port.exitlist.torproject.org
|
// server-port.reverse-server-ip.ip-port.exitlist.torproject.org
|
||||||
//$config['dnsbl'][] = $_SERVER['PORT'] . '.' . '4.3.2.1' . '.ip-port.exitlist.torproject.org';
|
//$config['dnsbl'][] = $_SERVER['PORT'] . '.' . '4.3.2.1' . '.ip-port.exitlist.torproject.org';
|
||||||
|
|
||||||
|
// Skip checking certain IP addresses against blacklists (for troubleshooting or whatever)
|
||||||
|
$config['dnsbl_exceptions'][] = '127.0.0.1';
|
||||||
|
|
||||||
// Typically spambots try to post a lot of links. Refuse a post with X standalone links?
|
// Typically spambots try to post a lot of links. Refuse a post with X standalone links?
|
||||||
$config['max_links'] = 20;
|
$config['max_links'] = 20;
|
||||||
// Maximum number of cites per post (protects against abuse)
|
// Maximum number of cites per post (protects against abuse)
|
||||||
|
|
|
@ -1139,6 +1139,9 @@
|
||||||
if(!isset($_SERVER['REMOTE_ADDR']))
|
if(!isset($_SERVER['REMOTE_ADDR']))
|
||||||
return; // Fix your web server configuration
|
return; // Fix your web server configuration
|
||||||
|
|
||||||
|
if(in_array($_SERVER['REMOTE_ADDR'], $dnsbl_exceptions))
|
||||||
|
return;
|
||||||
|
|
||||||
$ip = ReverseIPOctets($_SERVER['REMOTE_ADDR']);
|
$ip = ReverseIPOctets($_SERVER['REMOTE_ADDR']);
|
||||||
|
|
||||||
foreach($config['dnsbl'] as &$blacklist) {
|
foreach($config['dnsbl'] as &$blacklist) {
|
||||||
|
|
Loading…
Reference in New Issue